Windows Property
Home Page (Objects) | Overview | FAQ | Reference
Applies to: Application object, Document object, TextDocument object
Gets the Windows object.
Syntax
object**.Windows**
Parameters
object
An expression that evaluates to one of the objects in the Applies To list above. When you access the Windows property of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.
Remarks
The Windows property has the Windows type.
The Windows object is a collection object that represents all open windows associated with an object in the Applies To list. Each window in this collection is represented by a Window object.
The Windows property produces the following results for the objects in the Applies To list:
Object | Results |
Application | Gets the collection of all open windows |
Document | Gets the collection of all windows open on this document.
Text documents are the only types of documents that can have multiple windows. If you try to use this property on a window that is not a text window, you will get a Windows collection containing only one Window object. |
TextDocument | Gets the collection of all windows open on this text document. |
Example
The following example gets the collection of all open windows:
Dim Allwin
Set Allwin = Application.Windows