HTMLDocument 属性

       

返回 HTMLDocument 对象,该对象指定与当前视图中(假定存在一个)HTML 文档关联的 HTML 对象模型。

expression.HTMLDocument

expression  必选。该表达式返回 Explorer 对象。

说明

为使用该属性,必须将 MAPIfolder 的主页属性设置为某个 Web 页,或将 MAPIFolder 对象的 WebViewURL 属性设置为 web 页。

示例

以下示例访问 Outlook 视图控件。

Sub GetHTML()
'Returns the Outlook View control

    Dim objExp As Explorer
    Set objExp = Application.ActiveExplorer
    Dim HTMLDoc As HTMLDocument
    Set HTMLDoc = objExp.HTMLDocument
    Dim objVC As ViewControl
    Set objVC = HTMLDoc.All.Tags("object").Item(0).Object

End Sub