Returns an Object representing the HTML Document Object Model of the message being displayed. The HTML Document Object Model is defined by Microsoft Internet Explorer and is the same one used for Dynamic HTML. This object may be temporary and should not be stored for later use. Read-only.
The HTMLEditor property is only valid if the EditorType property of the item's associated Inspector is set to olEditorHTML.
expression.HTMLEditor
expression Required. An expression that returns an Inspector object.
Remarks
Outlook blocks code that attempts to access the HTMLEditor property for security reasons. If you run a third-party add-in, custom solution, or other program that uses the HTMLEditor property in Office Outlook 2003, you may receive the following warning:
A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No".
Example
The following Microsoft Visual Basic Scripting Edition (VBScript) example uses the Click event of a CommandButton control named "CommandButton1" to demonstrate the listing of all HTML elements.
Sub CommandButton1_Click()
Dim i 'As Integer
Dim strHTMLType 'As String
Dim strHTMLText 'As String
Dim NL 'As String
NL = chr(10) & chr(13)
Set myInspector = Item.GetInspector
Set myIExplorer = myInspector.HTMLEditor
If myIExplorer.ReadyState <> "complete" Then
'Test for complete loading of HTML doc
For i = 0 To myIExplorer.All.Length - 1
strHTMLType = TypeName(myIExplorer.All.Item(i))
On Error Resume Next
'because not all elements support OuterHTML
strHTMLText = ": " & NL & myIExplorer.All.Item(i).outerHTML
On Error GoTo 0
MsgBox strHTMLType & strHTMLText
strHTMLText = ""
Next
End If
End Sub