Working with PageWindows

A Web page that has been opened is represented by a PageWindow object. You access individual PageWindow objects via the PageWindows collection, which is a property of the WebWindow object. Each WebWindow object represents an open Web and is a member of the WebWindows collection. As you can see, the FrontPage application can have one or more Webs open, and each of those Webs can have multiple Web pages open.

You can access a specific PageWindow object by referring to the PageWindows collection of the Web that contains the opened page. The following code, for example, returns a reference to the first open page in the first open Web:

Dim myPageWindow As PageWindow
Set myPageWindow = WebWindows(0).PageWindows(0)

You can ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.