Reports object (Project)

Contains a collection of Report objects, where each report is a custom report.

Example

The Reports object is the collection of custom reports in a project. It does not include the built-in reports, such as Project Overview, Critical Tasks, or Milestone Report. Use the Project.Reports property to get the Reports collection object, as in the following example:

Sub ListCustomReports()
    Dim oReport As Report
    Dim msg As String
    Dim msgBoxTitle As String
    msg = ""
    msgBoxTitle = "Custom reports in '" & ActiveProject.Name & "'"
    
    For Each oReport In ActiveProject.Reports
        msg = msg & oReport.Index & ": " & oReport.Name & vbCrLf
    Next oReport
        
    If ActiveProject.Reports.Count > 0 Then
        MsgBox Prompt:=msg, Title:=msgBoxTitle
    Else
        MsgBox Prompt:="This project contains no custom reports.", _
            Title:=msgBoxTitle
    End If
End Sub

Methods

Name
Add
Copy
IsPresent

Properties

Name
Application
Count
Item
Parent

See also

Report Object

Project.Reports Property

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.