Page related procedures in class PageSetup (Word VBA)

This page presents procedures from class PageSetup related to the theme Page: DifferentFirstPageHeaderFooter, FirstPageTray, LinesPage, OddAndEvenPagesHeaderFooter, OtherPagesTray and TwoPagesOnOne

DifferentFirstPageHeaderFooter

True if a different header or footer is used on the first page. Can be True, False, or wdUndefined.

Dim secLoop As Section 
 
For Each secLoop In ActiveDocument.Sections 
 If secLoop.PageSetup _ 
 .DifferentFirstPageHeaderFooter = True Then 
 Msgbox "Section " & secLoop.Index _ 
 & " has different first page headers & footers." 
 End If 
Next secLoop

FirstPageTray

Returns or sets the paper tray to use for the first page of a document or section.

Possible Values are wdPrinterAutomaticSheetFeed - Automatic sheet feed, wdPrinterDefaultBin - Default bin, wdPrinterEnvelopeFeed - Envelope feed, wdPrinterFormSource - Form source, wdPrinterLargeCapacityBin - Large-capacity bin, wdPrinterLargeFormatBin - Large-format bin, wdPrinterLowerBin - Lower bin, wdPrinterManualEnvelopeFeed - Manual envelope feed, wdPrinterManualFeed - Manual feed, wdPrinterMiddleBin - Middle bin, wdPrinterOnlyBin - Printer's only bin, wdPrinterPaperCassette - Paper cassette, wdPrinterSmallFormatBin - Small-format bin, wdPrinterTractorFeed - Tractor feed, wdPrinterUpperBin - Upper bin.
ActiveDocument.PageSetup.FirstPageTray = wdPrinterLowerBin

LinesPage

Returns or sets the number of lines per page in the document grid.

ActiveDocument.PageSetup.LinesPage = 35

OddAndEvenPagesHeaderFooter

True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.

The OddAndEvenPagesHeaderFooter property can be True, False, or wdUndefined.

Set myDoc = Documents("Document1") 
myDoc.PageSetup.OddAndEvenPagesHeaderFooter = True 
With myDoc.Sections(1) 
 .Headers(wdHeaderFooterPrimary).Range _ 
 .InsertAfter "Odd Header" 
 .Headers(wdHeaderFooterEvenPages).Range _ 
 .InsertAfter "Even Header" 
End With

OtherPagesTray

Returns or sets the paper tray to be used for all but the first page of a document or section.

Possible Values are wdPrinterAutomaticSheetFeed - Automatic sheet feed, wdPrinterDefaultBin - Default bin, wdPrinterEnvelopeFeed - Envelope feed, wdPrinterFormSource - Form source, wdPrinterLargeCapacityBin - Large-capacity bin, wdPrinterLargeFormatBin - Large-format bin, wdPrinterLowerBin - Lower bin, wdPrinterManualEnvelopeFeed - Manual envelope feed, wdPrinterManualFeed - Manual feed, wdPrinterMiddleBin - Middle bin, wdPrinterOnlyBin - Printer's only bin, wdPrinterPaperCassette - Paper cassette, wdPrinterSmallFormatBin - Small-format bin, wdPrinterTractorFeed - Tractor feed, wdPrinterUpperBin - Upper bin.
ActiveDocument.PageSetup.OtherPagesTray = wdPrinterUpperBin

TwoPagesOnOne

True if Microsoft Word prints the specified document two pages per sheet.

ActiveDocument.PageSetup.TwoPagesOnOne = True