Inspector.EditorType 属性 (Outlook)

返回一个指示编辑器类型的 OlEditorType 常量。 只读。

语法

expressionEditorType

表达 一个代表 Inspector 对象的变量。

备注

Microsoft Office Outlook 2007 年以来 EditorType 属性将始终返回 olEditorWord

示例

此 Microsoft Visual Basic 脚本版本 (VBScript) 示例使用 Open 事件访问 HTMLBody 属性的项。 这将 EditorType 属性的项的 检查器中 设置为 olEditorHTML 。 如果此代码放在设计模式下的窗体的脚本编辑器中,运行时消息框会反映在 EditorType按窗体更改正文。 最后一条消息框利用 不会被终止 属性显示在脚本编辑器中的所有的 VBScript 代码。

Function Item_Open() 
 'Set the HTMLBody of the item. 
 Item.HTMLBody = "<HTML><H2>My HTML page.</H2><BODY>My body.</BODY></HTML>" 
 'Item displays HTML message. 
 Item.Display 
 'MsgBox shows EditorType is 2 which represents the HTML editor type 
 MsgBox "HTMLBody EditorType is " & Item.GetInspector.EditorType 
 'Access the Body and show 
 'the text of the Body. 
 MsgBox "This is the Body: " & Item.Body 
 'After accessing, EditorType 
 'is still 2. 
 MsgBox "After accessing, the EditorType is " & Item.GetInspector.EditorType 
 'Set the item's Body property. 
 Item.Body = "Back to default body." 
 'After setting the Body, EditorType is 
 'still the same. 
 MsgBox "After setting, the EditorType is " & Item.GetInspector.EditorType 
End Function

另请参阅

检查对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。