VerticalGap Property

Microsoft Publisher Visual Basic

expression.VerticalGap

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Use the VerticalGap property when printing multiple pages on a single sheet of printer paper. If the page size, including the values for the VerticalGap and HorizontalGap properties, is greater than half the paper size, Publisher will display an error.

When used with the Label object, the VerticalGap property is read/write only when accessed from .PageSetup.Label. Otherwise, it is read-only.

Example

This example sets the page height and width of the active document, specifies that it be printed with multiple pages on each sheet of printer paper, and sets the vertical gap between those two pages at half an inch. This example assumes the page orientation is set to landscape.

Sub SetVerticalGap()
    With ActiveDocument.PageSetup
        .PageHeight = InchesToPoints(8)
        .PageWidth = InchesToPoints(4)
        .MultiplePagesPerSheet = True
        .VerticalGap = InchesToPoints(0.5)
    End With
End Sub