Window.Document property (Word)

Returns a Document object associated with the specified pane, window, or selection. Read-only.



expression A variable that represents a Window object.


This example sets myDoc to the document associated with the active window. The focus is changed to the next window, and the window is split. The Activate method is used to switch back to the original document.

Set myDoc = Application.ActiveWindow.Document 
If Windows.Count >= 2 Then 
 Application.ActiveWindow.Split = True 
End If

See also

Window Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.