Open topic with navigation
To print a document
Open the document. See Open for more information.
Set the OPENWaitOnOpen property to
TRUE to make sure that the entire document is opened before the document is printed.
To print a document without viewing it, set the OPENMode property to
2 (open without generating a view). You can also set the
Visible property of the Viewing control object to
Use the CanPrint property to determine whether the document is completely processed and ready for printing.
Optionally, use the PrintHeaders property to specify whether the file name and page number header are printed at the top of each page of the printed output.
Used in conjunction with the
PrintHeaders property, the SetPrintName method replaces the default file name field of the print header with another string.
Use either the PrintDlg method to print using a common Print dialog box, or the PrintOut method to print to a specific printer without a Print dialog box.