Application.FilePrint method (Project)
Prints the active view.
Syntax
expression. FilePrint
( _FromPage_
, _ToPage_
, _PageBreaks_
, _Draft_
, _Copies_
, _FromDate_
, _ToDate_
, _OnePageWide_
, _Preview_
, _Color_
, _ShowIEPrintDialog_
)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
FromPage | Optional | Integer | A number that specifies the first page to print. The default value is 1. |
ToPage | Optional | Integer | A number that specifies the last page to print. The default is the last page in the project. |
PageBreaks | Optional | Boolean | True if Project uses manual page breaks when printing. The default value is True. |
Draft | Optional | Boolean | True if Project prints the active view in draft mode. The default value is False. |
Copies | Optional | Integer | A number that specifies the number of copies to print. The default value is 1. |
FromDate | Optional | Variant | A number or string that specifies the first date to print. The default is the start date of the project. |
ToDate | Optional | Variant | A number or string that specifies the last date to print. The default is the finish date of the project. |
OnePageWide | Optional | Boolean | True if Project prints only the leftmost columns of the active view. The default value is False. |
Preview | Optional | Boolean | True if Project previews the active view rather than printing it. The default value is False. |
Color | Optional | Boolean | True if Project prints the active view in color. The default value is False. |
ShowIEPrintDialog | Optional | Boolean | If True, shows the Internet Explorer print dialog while printing. |
Return value
Boolean
Remarks
FilePrint with no arguments acts the same as the FilePrintPreview method. It opens the Backstage view and displays the Print tab with a print preview.
Example
The following example prints the active view without using manual page breaks.
Sub PrintViewWithoutPageBreaks()
FilePrint PageBreaks:=False
End Sub
The following command prints the active view to the default printer, and shows the Internet Explorer print dialog.
Application.FilePrint ShowIEPrintDialog:=True
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.