Home Page (Objects) | Overview | FAQ | Reference
Applies to: Document object, TextDocument object
Creates a new window for a document.
Syntax
object.NewWindow
Parameters
object
An expression that evaluates to a Document object or a TextDocument object.
Return Values
The NewWindow method returns the Window object corresponding to the window created.
Remarks
You can create a new window for a text document but not for most other document types. If you try to create a new window for a document that does not permit another window, the NewWindow method returns the DS_E_CANNOTCREATENEWWINDOW error.
Example
The following example creates a new window in a text document:
ActiveDocument.NewWindow