會取得或設定文件類別的值 (此類別是文件的其中一個屬性)。 讀取/寫入。
語法
表情。類
詞 一個代表 文件 物件的變數。
傳回值
字串
註解
設定類別屬性相當於在屬性對話框的類別框中輸入資訊 (點選檔案標籤、點選資訊、點選屬性,然後點選進階屬性) 。
範例
這個 Microsoft Visual Basic 巨集展示了如何使用 Category 屬性來分類繪圖。 它會在 Documents 集合中新增一個 Document 物件,並設定該 Document 物件的 Category 屬性以及其他屬性。
在執行這個巨集之前,請用您的值來替代下列程式碼中的斜體字項目。 若要驗證是否已設定這些屬性,請開啟 [屬性] 對話方塊。
Public Sub Category_Example()
Dim vsoDocument As Visio.Document
Set vsoDocument = Documents.Add("")
'Set the properties of the document.
vsoDocument.Title = "document title "
vsoDocument.Creator = "author name "
vsoDocument.Description = "document description "
vsoDocument.Keywords = "keyword1, keyword2, keyword3 "
vsoDocument.Subject = "document subject "
vsoDocument.Manager = "manager name "
vsoDocument.Category = "document category "
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。