Application.VisualReportsNewTemplate 方法 (Project)
會建立 Microsoft Excel 或 Microsoft Visio 的視覺報表範本。
語法
expression。 VisualReportsNewTemplate
( _PjVisualReportsTemplateType_
, _PjVisualReportsCubeType_
, _ReportAlLFields_
, _PjVisualReportsDataLevel_
)
expression 代表 Application 物件的變數。
參數
名稱 | 必要/選用 | 資料類型 | 描述 |
---|---|---|---|
PjVisualReportsTemplateType | 選用 | Long | 範本類型。 可以是 PjVisualReportsTemplateType 常數之一。 預設值為 pjExcel 。 |
PjVisualReportsCubeType | 選用 | Long | Cube 類型。 可以是 PjVisualReportsCubeType 常數之一。 預設值為 pjTaskTP 。 |
ReportAlLFields | 選用 | Boolean | 如果 為 True ,所有的非自訂欄位都包含在報表中。 |
PjVisualReportsDataLevel | 選用 | Long | 資料層級。 可以是 PjVisualReportsDataLevel 常數之一。 預設值為 pjLevelAutomatic 。 |
傳回值
布林值
註解
將 ReportAllFields 參數設 為 True 可能會降低效能。
PjVisualReportsDataLevel 參數會指定之時段式資料都可以存取層級。 例如,如果 pjLevelMonths (月數) 指定,則它可能無法予以存取 pjLevelDays (天)。
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。