specialistbad.blogg.se

Word header on first page only 2018
Word header on first page only 2018









word header on first page only 2018 word header on first page only 2018

The example below creates a header in all pages, consisting of a table with two cells. You need to add the header/footer into the wdHeaderFooterFirstPage range for the first page and into wdHeaderFooterPrimary for all other pages depending on the header/footer settings of the document. = wdAlignParagraphRightĪ = wdSeekCurrentPageFooter , LinkToFile:=False, SaveWithDocument:=True FooterDistance = CentimetersToPoints(1.0) HeaderDistance = CentimetersToPoints(1.0) I have tried a few different methods such as iterating through each shape on the page but in that case, the header and footer prints out multiple times on each page depending on how many shapes are in the document.Ĭurrently my code is looking for any current header and footer and deleting them, then it just inserts my header and footer on the first page and leaves the remaining pages in the document's header and footer blank.Ĭan anyone tell me where I am going wrong? Sub HeaderFooter()Ī = wdSeekCurrentPageHeader I am trying to add a header and a footer to each page of a word document via a macro.











Word header on first page only 2018