OpenDocuments.CreateNewDocument2 Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Creates a document based on the specified document template and window object.

expression.CreateNewDocument2(pdisp, bstrTemplateLocation, bstrDefaultSaveLocation)

Parameters

expression

An expression that returns an OpenDocuments Control object.

pdisp

An Object that represents the window from which the CreateNewDocument2 method is being activated.

bstrTemplateLocation

A string that contains the URL of the document template from which the document is created, or the programmatic identifier (progID) of the application to invoke when creating the document.

bstrDefaultSaveLocation

A string that contains the path that specifies a suggested default location for saving the new document.

Return Value

true if the document creation succeeds; otherwise false.