Muokkaa

Jaa


Inspector.EditorType property (Outlook)

Returns an OlEditorType constant indicating the type of editor. Read-only.

Syntax

expression. EditorType

expression A variable that represents an Inspector object.

Remarks

Since Microsoft Office Outlook 2007, the EditorType property always returns olEditorWord.

Example

This Microsoft Visual Basic Scripting Edition (VBScript) example uses the Open event to access the HTMLBody property of an item. This sets the EditorType property of the item's Inspector to olEditorHTML. If this code is placed in the Script Editor of a form in design mode, the message boxes during run time will reflect the change in the EditorType as the body of the form changes. The final message box utilizes the ScriptText property to display all the VBScript code in the Script Editor.

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

See also

Inspector Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.