html vc doc,HTMLDocument Property

本文档介绍如何使用HTMLDocument属性访问Outlook视图控制,该属性返回与当前视图中HTML文档相关联的HTML对象模型。在使用此属性前,需确保文件使用了文件主页,或者设置了MAPIFolder对象的WebViewURL属性为网页地址。示例代码展示了如何通过VBA访问并操作OutlookViewControl的AddressBook功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

HTMLDocument Property

07/11/2006

2 minutes to read

In this article

Returns an HTMLDocument object that specifies the HTML object model associated with the HTML document in the current view (assuming one exists).

expression.HTMLDocument

*expression   * Required. An expression that returns an

Remarks

In order to use this property, a folder must be using a folder home page, or you can set the **WebViewURL**property of the MAPIFolder object to a Web page.

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example accesses the Microsoft Outlook View Control.

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值