This documentation is archived and is not being maintained.

HTMLEditor Property


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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.

Example

The following 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
Show: