Hi Peter
the functionality of the code you supplied was spot on!
I still have a problem that I can't seem to resolve...
When I load in an image into the first page header, It resizes / positions
it to fit within the margins. I need it to display 100% size and positioned
with a zero top, left and right margin.
I have used my old friend the 'Macro recorder' to try and script the actions
required for the task, however when I add the actions to my script, I get
'Method or data member not found' on some of the methods.
My latest script is included below. The commented lines are the methods that
are not recognised.
Any further comments would be appreciated.
Thanks
Gordon
Dim rngHeader As Word.Range
With ActiveDocument.Sections(1)
.PageSetup.DifferentFirstPageHeaderFooter = True
' Add image to the First Page Header
Set rngHeader = .Headers(wdHeaderFooterFirstPage).Range
With rngHeader.InlineShapes.AddPicture(IMAGE_PATH & strColour &
".jpg", LinkToFile:=False, SaveWithDocument:=True)
.Fill.Visible = msoFalse
.Fill.Solid
.Fill.Transparency = 0#
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoFalse
.LockAspectRatio = msoTrue
'.Rotation = 0#
.PictureFormat.Brightness = 0.5
.PictureFormat.Contrast = 0.5
.PictureFormat.ColorType = msoPictureAutomatic
.PictureFormat.CropLeft = 0#
.PictureFormat.CropRight = 0#
.PictureFormat.CropTop = 0#
.PictureFormat.CropBottom = 0#
'.Left = 2.55
'.Top = 0#
'.RelativeHorizontalPosition =
wdRelativeHorizontalPositionColumn
'.RelativeVerticalPosition = wdRelativeVerticalPositionPage
'.Left = CentimetersToPoints(-3.26)
'.Top = CentimetersToPoints(0)
'.LockAnchor = False
'.WrapFormat.AllowOverlap = True
'.WrapFormat.Side = wdWrapBoth
'.WrapFormat.DistanceTop = CentimetersToPoints(0)
'.WrapFormat.DistanceBottom = CentimetersToPoints(0)
'.WrapFormat.DistanceLeft = CentimetersToPoints(0.32)
'.WrapFormat.DistanceRight = CentimetersToPoints(0.32)
'.WrapFormat.Type = 3
'.ZOrder 5
'.ScaleWidth 0.75, msoFalse, msoScaleFromBottomRight
'.ScaleHeight 0.75, msoFalse, msoScaleFromTopLeft
'.IncrementLeft -150.5
'.IncrementTop 2.5
'.ScaleWidth 1.34, msoFalse, msoScaleFromTopLeft
'.ScaleHeight 1.34, msoFalse, msoScaleFromTopLeft
'.IncrementTop -9#
'.ScaleWidth 1.01, msoFalse, msoScaleFromTopLeft
'.ScaleHeight 1.01, msoFalse, msoScaleFromTopLeft
End With
End with