O'Reilly logo

Writing Word Macros, Second Edition by Steven Roman PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Window Object

A Window object represents a window. Window objects are kept in a Windows collection. Figure 11-4 shows the Windows object and its children. (I discuss Document and Selection objects in Chapters Chapter 12 and Chapter 14.)

The Windows object and its children

Figure 11-4. The Windows object and its children

Windows, Panes, and Views

In Microsoft Word, each window is associated with a document. Normally, a document window contains a single document pane, but a window can be split into two panes. (Additional panes may exist if comments or footnotes are visible, but I do not deal with these types of panes.)

Many of the visibility-related properties of windows (as opposed to the contents of the windows), such as scrolling and the appearance of rulers and scrollbars, are properties of the Pane objects associated with the window. However, since normally there is only one pane per window, Microsoft was kind enough to define these properties for the Window object as well. Thus, for instance, to scroll down the active window pane, I can write:

	ActiveWindow.LargeScroll

instead of:

	ActiveWindow.ActivePane.LargeScroll

Many of the visibility-related properties of the contents of a window, such as whether hidden text is visible or paragraph marks are visible, are accessed through the View object, which is a child of both the Pane object and the Window object (in keeping with the precept mentioned in the previous paragraph). ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required