Property

Method

Event

 

 

CreateDom

Returns an IHTMLDocument2 object, needed to access the current document from a client script on the Web page.

Syntax

    HRESULT CreateDOM(
    IHTMLDocument2** ppIHTMLDoc2
    );

Parameters

pplHTMLDoc2

[out, retval] Returns IHTMLDocument2 object to the current HTML document.

Return Values

0

Success (default)

1

Failure

Remarks

    By using the returned object, a part of the current document can be modified or read. The DeleteDom method should be called after CreateDom is used.

Sample Codes

VBScript

dim object
set object = Document.editForm
set doc = object.wec.CreatDOM
set allCol = object.idom.all

MsgBox doc.title
doc.title = "This is Title"

For i = 0 to allCol.length-1
  MsgBox allCol(i).innerHTML
next

object.wec.DeleteDOM

See Also

DeleteDOM