共用方式為


報告 (專案)

包含一組 報告 物件,每個報告都是自訂報告。

範例

報告物件是專案中自訂報告的集合。 它不包含內建的報告,例如 專案概覽關鍵任務里程碑報告。 請使用 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

屬性

名稱
Application
數目
項目
Parent

另請參閱

Report 物件

Project.Reports 財產

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應