Type | Description | |||
Field as FieldsEnum | A Field being changed | |||
Variant | A long expression or a string expression that indicates the field's value. |
Use the Preview method to preview an object. The DoPrint method prints an object.
The following sample changes the PageSize field to A4 format, before previewing an exGrid control:
Private Sub Command1_Click() With Print1 Set .PrintExt = Grid1.Object .Settings(exPaperSize) = 9 .Preview End With End Sub
The exDisplayInch value must be changed before any other Settings like in the following sample. The sample specifies an A4 Landscape format, and printer dialog displays the millimeters instead inches:
With Print1 Set .PrintExt = Grid1.Object .PageOrientation = exLandscape .Settings(exDisplayInch) = 1 .Settings(exPaperSize) = 9 .Preview End With