I need to set the margins differently for the first page than the rest of the pages.
I've messed around with inserting section breaks (as from what I've read is that Word creates a section break when you choose to apply "this point forward" from the Page Setup Margins tab, but I can't seem to consistently create a continuous section break at the start of the second page.
If not section breaks, any other way would be fine. Need to adjust margins to match new letterhead design for a bunch of existing documents so am planning on fixing the margins in a sub-routine when the print button is clicked (part of another macro).
A Continuous Section Break is used to allow multiple sets of margins within the same page. A Next Page Section Break, which has the properties of both a section break and a page break, will allow one set of margins for the first page and another set of margins for all pages following it. One way it can be created is like this:
Selection.InsertBreak Type:=wdSectionBreakNextPage
Now here's where it gets tricky. Word has two different types of page breaks: Automatic and Manual. Automatic page breaks get created when text no longer fits on a page and Word automatically generates a new page. If the documents you are reformatting via the macro have automatic page breaks, inserting the Next Page Section Break at the end of the first page will cause Word to delete its Automatic Page Break (using the Next Page Section Break to keep the pages separate) and any margin changes you make to the first page will not carry over to the following pages. However, if the documents contain a Manual Page Break between pages one and two, inserting the Next Page Section Break will create a blank second page. As such, if this is a possibility, code will need to be written to detect the Manual Page Break and delete it after the Next Page Section Break has been inserted.