返回 Inspector 对象,代表初始化为包含指定项目的检查器。该属性用于返回显示项目的新 Inspector 对象,与使用 ActiveInspector 方法并设置 CurrentItem 属性相比,该属性更有用。
expression.GetInspector
expression 必选。该表达式返回“应用于”列表中的一个对象。
如果用户的默认电子邮件编辑器是 Microsoft Word,而编辑的邮件格式为纯文本或 HTML 格式,则 GetInspector 对象产生错误并返回 Nothing。
本 Visual Basic for Applications 示例使用 GetInspector 为 myItem
返回一个新的不活动的检查器,然后显示它。
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myInspector = myItem.GetInspector
myInspector.Display
如果使用 VBScript,则不创建 Application 对象,而且也不能使用命名常量。本示例说明如何使用 VBScript 执行相同任务。
Set myItem = Application.CreateItem(0)
Set myInspector = myItem.GetInspector
myInspector.Display