ShowPrint Method (ACommonDialog)

Displays the Print dialog box.

Syntax

[ enRetVal = ] Object.ShowPrint()

The ShowPrint method syntax has the following parts:

 

Name

Type

Description

Object

An Object

An object

enRetVal

Val enumACommonDialogRetVal

An integer specifying the status of the dialog box.

Where

enumACommonDialogRetVal can be one of the following:

 

Name

Value

Description

acdlgRetValOk

0x00000000

OK

acdlgRetValCancel

0x00000001

Cancel

acdlgRetValError

0x00000002

Error

Comments

After initializing the dialog box’s properties, call the ShowPrint method to display the dialog box and allow the user to select print options.

Example

The following example will display the Print dialog box:

cdlg.Copies=2

cdlg.FromPage=1

cdlg.ToPage=10

cdlg.PrintOptions=acdlgPrintOptionsPageNums OR acdlgPrintOptionsHidePrintToFile

cdlg.ShowPrint()

Applies to

ACommonDialog

See Also

PrinterDefault, PrintOptions