Application.ReportPrint method (Project)

Deprecated in Project. Prints a report.

Syntax

expression. ReportPrint( _Name_, _FromPage_, _ToPage_, _PageBreaks_, _Draft_, _Copies_, _FromDate_, _ToDate_, _Preview_, _Color_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Name Optional String The name of the report to print
FromPage Optional Integer A number that specifies the first page to print.
ToPage Optional Integer A number that specifies the last page to print.
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 report 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 value is the start date of the project.
ToDate Optional Variant A number or string that specifies the last date to print. The default value is the finish date of the project.
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 report in color. The default value is False.

Return value

Boolean

Remarks

In Project, the ReportPrint method returns error 1100, "The method is not available in this situation." In Project, using the ReportPrint method no arguments displays the Custom Reports dialog box.

Example

The following example creates a consolidated project, prints a report, and closes the consolidated project without saving it.

Sub ConsolidatedReport() 
    ConsolidateProjects Filenames:="project1.mpp" & ListSeparator & "project2.mpp" 
    ReportPrint Name:="Project Summary" 
    FileClose Save:=pjDoNotSave 
End Sub

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.