View Single Post
 
Old 11-12-2018, 07:53 PM
Sarah123 Sarah123 is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2018
Posts: 9
Sarah123 is on a distinguished road
Default

@Guessed, thank you!

The idea if for me to build each template we have saved on this macro template, so in theory it should be ok. But any other suggestions you have would be welcomed, you obviously know more than me!

I am so having trouble with the last two sections of this code, if you have any suggestions?

Sub AddImageToHeader()
Dim SrcePath As String, headerPic As InlineShape

SrcePath = "S:\DocBase\Document Templates\Macros\New Macros Nov 2018\Letterhead.jpg"

Set headerPic = ThisDocument.Sections.Item(1).Headers(wdHeaderFoot erPrimary).Range.InlineShapes.AddPicture(SrcePath)

With headerPic
.Width = CentimetersToPoints(20.96)
.Height = CentimetersToPoints(5.11)
End With

With headerPic.WrapFormat
.Type = wdWrapBehindText
End With

With headerPic.Range
.ParagraphFormat.Alignment = wdAlignParagraphLeft
End With


End Sub
Reply With Quote