Export (0) Print
Expand All
3 out of 4 rated this helpful - Rate this topic

createDocumentFromUrl method

Creates a new document object from an existing URL.

Syntax


HRESULT retVal = object.createDocumentFromUrl(bstrUrl, bstrOptions, oNewDoc);

Parameters

bstrUrl [in]

Type: BSTR

A BSTR that specifies the URL of the page from which to create the new document.

bstrOptions [in]

Type: BSTR

A BSTR that specifies the media type for applying media style sheets on creation of the document. It can be one of the following values.

print

Sets the media value for printing or print preview.

null

Ignores the media value.

oNewDoc [out, retval]
C++A pointer to an IHTMLDocument2 interface that receives the newly created document.
JavaScriptReturns the newly created document.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The page specified by bstrUrl is loaded asynchronously. The HTMLFrameSiteEvents::onload event is fired on the new document object when the Dynamic HTML (DHTML) object model is available.

See also

IHTMLDocument4::media

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.