Outlook) (Explorer.HTMLDocument 屬性
會傳回 HTMLDocument 物件,此物件指定目前檢視中與 HTML 文件關聯的 HTML 物件模式 (假設存在一個)。 唯讀。
語法
expression。 HTMLDocument
表達 代表 'Explorer' 物件的變數。
註解
若要使用此屬性,資料夾必須使用資料夾首頁,或者您可以將Folder物件的WebViewURL屬性設定為網頁。
範例
下列 Microsoft Visual Basic for Applications (VBA) 範例會存取 Microsoft Outlook 檢視控制項。
Sub GetHTML()
'Returns the Outlook View Control
Dim objVC As OLXLib.ViewCtl
Dim objExp As Outlook.Explorer
Dim HTMLDoc As MSHTML.HTMLDocument
'Reference the current folder
Set objExp = Application.ActiveExplorer
'Reference the HTML file that is the home page
Set HTMLDoc = objExp.HTMLDocument
'Reference an Outlook View Control that is on the HTML page
Set objVC = HTMLDoc.all.tags("object").Item(0).Object
'Have the control display an address book window
objVC.AddressBook
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應