Application.ApplyReport method (Project)
Displays the specified report.
expression. ApplyReport
(Name, ApplyTo)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | The name of the report. |
ApplyTo | Optional | Variant | The ApplyTo parameter is not used in Project. |
Name | Optional | Variant | |
ApplyTo | Optional | Variant |
Boolean
The ApplyReport method can be applied to custom reports and to built-in reports, such as Project Overview.
The following example checks whether a report exists; if so, the example displays the report, and then zooms the report to 80% of its original size.
Sub ReportZoom()
Dim reportName As String
reportName = "Report 1"
If ActiveProject.Reports.IsPresent(reportName) Then
ApplyReport reportName
ZoomReport 80
Else
MsgBox Prompt:="No custom report name: " & reportName, Title:="Report apply error"
End If
End Sub
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.