Click to return to the Reusing Browser Technology home page    
IHTMLTxtRange::parentElem...     IHTMLTxtRange::queryComma...     IHTMLTxtRange Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLTxtRange::pasteHTML Method


Pastes HTML text into the given text range. The text completely replaces any previous text and HTML elements in the range.

Syntax

HRESULT pasteHTML(
    BSTR html 
);

Parameters

html
String that specifies the HTML text to paste.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

Although this method never fails, it might alter the HTML text to make it fit the given text range. For example, attempting to paste a table cell into a text range that does not contain a table might cause the method to insert a TABLE element. For predictable results, you should paste only well-formed HTML text that is appropriate for the given text range.

You cannot use this method while the document is loading. Wait for the onload event before attempting to use it.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.