Reefslayer
IS-IT--Management
Hello All.
I'm from a networking background so I'm entirely out of my depth encountering errors in the code below.
I assume this macro can be used to enforce fonts/styles etc.
When I run it within the doc I get Compile Error: Method or Data member not found. This occurs at the .UnderlineColor = line. I've checked on the net for code references and the syntax appears to be correct. could anyone provide any pointers for me in terms of:-
What exactly is the code trying to do?
What is the most likely cause/resolution to my error?
Is there likely to be an office version dependancy involved. (i'm running Office 97 and suspect this was authored on a later version.
I've downloaded and installed VB6 Runtime but this hasn't made any difference.
Any help appreciated.
Thanks
Paul.
Sub size3pt7()
'
' size3pt7 Macro
' Macro recorded þ25/05/2002 by richie
'
Selection.InlineShapes(1).Fill.Visible = msoFalse
Selection.InlineShapes(1).Fill.Transparency = 0#
Selection.InlineShapes(1).Line.Weight = 0.75
Selection.InlineShapes(1).Line.Transparency = 0#
Selection.InlineShapes(1).Line.Visible = msoFalse
Selection.InlineShapes(1).LockAspectRatio = msoTrue
Selection.InlineShapes(1).Height = 10.5
Selection.InlineShapes(1).Width = 9.4
Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
Selection.InlineShapes(1).PictureFormat.ColorType = msoPictureAutomatic
Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
Selection.InlineShapes(1).PictureFormat.CropRight = 0#
Selection.InlineShapes(1).PictureFormat.CropTop = 0#
Selection.InlineShapes(1).PictureFormat.CropBottom = 0#
With Selection.Font
.Name = "Garamond"
.Size = 11
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = -2
.Kerning = 0
.Animation = wdAnimationNone
.SizeBi = 11
.NameBi = "Times New Roman"
.BoldBi = False
.ItalicBi = False
End With
End Sub
I'm from a networking background so I'm entirely out of my depth encountering errors in the code below.
I assume this macro can be used to enforce fonts/styles etc.
When I run it within the doc I get Compile Error: Method or Data member not found. This occurs at the .UnderlineColor = line. I've checked on the net for code references and the syntax appears to be correct. could anyone provide any pointers for me in terms of:-
What exactly is the code trying to do?
What is the most likely cause/resolution to my error?
Is there likely to be an office version dependancy involved. (i'm running Office 97 and suspect this was authored on a later version.
I've downloaded and installed VB6 Runtime but this hasn't made any difference.
Any help appreciated.
Thanks
Paul.
Sub size3pt7()
'
' size3pt7 Macro
' Macro recorded þ25/05/2002 by richie
'
Selection.InlineShapes(1).Fill.Visible = msoFalse
Selection.InlineShapes(1).Fill.Transparency = 0#
Selection.InlineShapes(1).Line.Weight = 0.75
Selection.InlineShapes(1).Line.Transparency = 0#
Selection.InlineShapes(1).Line.Visible = msoFalse
Selection.InlineShapes(1).LockAspectRatio = msoTrue
Selection.InlineShapes(1).Height = 10.5
Selection.InlineShapes(1).Width = 9.4
Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
Selection.InlineShapes(1).PictureFormat.ColorType = msoPictureAutomatic
Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
Selection.InlineShapes(1).PictureFormat.CropRight = 0#
Selection.InlineShapes(1).PictureFormat.CropTop = 0#
Selection.InlineShapes(1).PictureFormat.CropBottom = 0#
With Selection.Font
.Name = "Garamond"
.Size = 11
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = -2
.Kerning = 0
.Animation = wdAnimationNone
.SizeBi = 11
.NameBi = "Times New Roman"
.BoldBi = False
.ItalicBi = False
End With
End Sub