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

Hi Everyone,

I'm just having a little error with some code. I'm wanted a header & footer to insert on the first page only.

When my code is written as the following it works fine, but inserts onto all pages of the document.

Code:
  Set headerPic = ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.InlineShapes.AddPicture(SrcePath)
However when I change to the following, the code appears to run, but nothing happens & I don't receive any error notification.

Code:
  Set headerPic = ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range.InlineShapes.AddPicture(SrcePath)
Any help or advice you have would be greatly appreciated.
Reply With Quote