Outlook) (Inspector.EditorType 屬性

傳回 OlEditorType 常數,指出編輯器的類型。 唯讀。

語法

expression。 EditorType

運算式 代表 Inspector 物件的變數。

註解

自 Microsoft Office Outlook 2007 起,EditorType 屬性一律會傳回 olEditorWord。

範例

此Microsoft Visual Basic Scripting Edition (VBScript) 範例使用 Open 事件存取項目的 HTMLBody 屬性。 這會將項目檢查器的EditorType 屬性設定為 olEditorHTML。 如果將此程式碼放置在設計模式表單的指令碼編輯器中,則執行階段期間的訊息方塊會隨著表單本文的變更,反映 EditorType 中的變更。 最後一個訊息框會使用 ScriptText 屬性顯示指令碼編輯器中的所有 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 支援與意見反應。