Changing margins conditionally
Page margins can be controlled conditionally by use of formula.
Margins based on page number
The following formula checks whether a page number is even or odd and sets the margins accordingly: if the page is an even number, the margin is set to one inch; if the page is an odd number, the margin is set to two inches.
If Remainder(pagenumber,2) = 0 then 1440 else 2880
Margins based on page orientation
The following formula checks for page orientation and sets the margins accordingly: if the orientation is portrait, the margin is set to one inch; if the orientation is landscape, the margin is set to two inches.
If CurrentPageOrientation = crPortrait then 1440 else 2880