共用方式為


Report.Name 專案) (屬性

取得或設定報表的名稱。 讀取/寫入的 String

語法

運算式名字

表達 代表 'Report' 物件的變數。

範例

下列範例會列出專案中每個自訂報表的索引和名稱。

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

屬性值

STRING

另請參閱

Report 物件Reports 物件

支援和意見反應

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