I was just using code, which I knew to work with the format of the images. Originally I was defining the anchor, where I attached the image, as Anchor:=Selection.Range. It had to do with the way I was adding the image.
![how to delete a header on the second page how to delete a header on the second page](https://cdn.extendoffice.com/images/stories/doc-word/remove-header-line/doc-remove-header-line-3.png)
I figured out, why the image was "moving" to page 2, when I added a second (and third and so on) page. Sections(1).Footers(wdHeaderFooterPrimary) _ I have also tried to preemptively add the header to the following pages, but it doesn't seem to work With ActiveDocument Sections(1).Footers(wdHeaderFooterFirstPage) _
How to delete a header on the second page code#
My code at the moment is something like the following, although I have removed the parts for image formating, since it isn't relevant in my opinion: With ActiveDocument So basically the question I have is, if I can add a picture to a header from the second page onward, while the page doesn't exist yet? This means, that when I add a picture into the header on the first page via VBA code and I add text (or just blank space), the logo doesn't get repeated.
![how to delete a header on the second page how to delete a header on the second page](https://www.excelatwork.co.nz/wp-content/uploads/2021/08/Remove-extra-page-in-Word-6.jpg)
I do have a constraint, that the footer on the first page is different to the ones from the second page onwards.
![how to delete a header on the second page how to delete a header on the second page](https://i.stack.imgur.com/E6oQ2.jpg)
I need to create a Word-Template, which dynamically adds a logo into the header of a letter.