共用方式為


Inspector.EditorType 屬性 (Outlook)

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

語法

expressionEditorType

表達 代表 Inspector 物件的變數。

註解

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

範例

這個 Microsoft Visual Basic Scripting Edition (VBScript) 範例會使用 Open 事件來存取專案的 HTMLBody 屬性。 這會將專案的InspectorEditorType屬性設定為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

另請參閱

Inspector 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應