![]() |
|
#4
|
|||
|
|||
|
Hi Sarah, First of all, you do not use the statement 2 times.
And it should be Headers, not Header. And no space between wdHeaderFooterPrimary And if you wanna use "headerPic", do not Dim "header_pic".... the code below should work Code:
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(wdHeaderFooterPrimary).Range.InlineShapes.AddPicture(SrcePath)
With headerPic
.Width = 5.11
.Height = 20.96
End With
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Header and Footer | Diablodvs7 | Word | 1 | 07-28-2015 07:54 PM |
| Header and footer aligned in the footer area | ashiqghfr | Word | 2 | 07-23-2015 01:14 AM |
header footer
|
Pierre-Hugues | Word VBA | 1 | 08-30-2013 06:06 AM |
| How to resize the image in the header so that it fits the page | Isadora | Excel | 1 | 08-20-2013 06:02 AM |
| Relocate footnotes to facing page | Wydeye | Word | 0 | 02-23-2010 05:48 PM |