會取得或設定文件所屬的公司名稱,這是文件的其中一個屬性。 讀取/寫入。
語法
表情。公司
詞 一個代表 文件 物件的變數。
傳回值
字串
註解
設定公司屬性相當於在屬性對話框中輸入資訊, (點選「檔案」標籤、點選「資訊」、「屬性」,然後點選「進階屬性) 」。
範例
這個 Microsoft Visual Basic 巨集展示了如何使用 Company 屬性來記錄繪圖所屬的公司。 它會在 Documents 集合中新增一個 Document 物件,並設定該 Document 物件的公司屬性及其他屬性。
在執行這個巨集之前,請用您的值來替代下列程式碼中的斜體字項目。 若要驗證是否已設定這些屬性,請開啟 [屬性] 對話方塊。
Public Sub Company_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.Company = "company name "
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。