Share via


Reports オブジェクト (Project)

レポート オブジェクトのコレクションが含まれます。各レポートはカスタム レポートです。

Reports オブジェクトは、プロジェクト内のカスタム レポートのコレクションです。 組み込みのレポート ( プロジェクトの概要重要なタスクマイルストーン レポートなど) は含まれません。 次の例のように、 Project.Reports プロパティを使用して Reports コレクション オブジェクトを取得します。

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

メソッド

名前
Add
Copy
IsPresent

プロパティ

名前
アプリケーション
Count
アイテム
Parent

関連項目

Report オブジェクト

Project.Reports プロパティ

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。