View Single Post
 
Old 11-12-2018, 06:18 PM
Sarah123 Sarah123 is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2018
Posts: 9
Sarah123 is on a distinguished road
Default Add, Resize & Relocate Header & Footer with Macros

Hi,

We have a large volume of templates that need to be formatted for print & electronic distribution. Print needs to be blank so it can be printed on pre-printed letter head. For electronic distribution, I want to add a macro button in to insert our company header and footer. I have the below to bring the pictures through, but I have no idea how to resize and relocate into the correct position. Any ideas would be greatly appreciated!


Sub AddImageToHeader()

Dim SrcePath As String

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

ThisDocument.Sections.Item(1).Headers(wdHeaderFoot erPrimary) _
.Range.InlineShapes.AddPicture (SrcePath)

End Sub

Sub AddImageToFooter()

Dim SrcePath As String

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

ThisDocument.Sections.Item(1).Footers(wdHeaderFoot erPrimary) _
.Range.InlineShapes.AddPicture (SrcePath)

End Sub
Reply With Quote