Application.ApplyReport method (Project)

Displays the specified report.

Syntax

expression. ApplyReport (Name, ApplyTo)

expression A variable that represents an Application object.

Parameters

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

Return value

Boolean

Remarks

The ApplyReport method can be applied to custom reports and to built-in reports, such as Project Overview.

Example

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

See also

Report.Apply Method

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.