Share via


WebWindowEx Object

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

WebWindows
Aa190253.parchild(en-us,office.10).gifWebWindowEx
Aa190253.space(en-us,office.10).gifAa190253.parchild(en-us,office.10).gifPageWindows

Represents a window that is opened on a Microsoft FrontPage web. The WebWindowEx object is a member of the WebWindows collection. The WebWindows collection represents all of the open windows in a specified web or in FrontPage. Within the WebWindows collection, individual WebWindowEx objects are indexed beginning with zero. Each web that is opened in FrontPage is contained in a new WebWindowEx object, unless it is opened in a windowless environment by setting the Visible property of the WebWindowEx object to False. For more information on windowless environments, see Coding in a Windowless Environment.

Using the WebWindow Object

Use the WebWindow property to return information about an open WebWindowEx object. You can also use the PageWindows property to return information about the collection of open pages in a WebWindowEx object. Use WebWindows(index), where index is the index number of a web window item, to return a single WebWindow object. The following statement returns the ViewMode property of the first web window item in the WebWindows collection.

  myViewMode = WebWindows(0).ViewMode

You can also use the ViewMode property to switch between view modes by setting the view mode as shown in the following statement, which switches the current view mode to the Navigation view.

  ActiveWebWindow.ViewMode = fpWebViewStructure

The Activate method puts the focus on the specified WebWindowEx object. The following statements activates the first web in the collection of open web windows.

  myWebWindow = WebWindows(0)
myWebWindow.Activate

The ActivePageWindow property returns the active PageWindowEx object. The following statements return the URL and the caption of the active PageWindowEx object. The value returned for the caption in this case is a file name, such as "Index.htm".

  urlThisDoc = WebWindow.ActivePageWindow.Document.Url
fileName = WebWindow.ActivePageWindow.Caption

You can also return the Caption property from the WebWindowEx object. In this case the text that is returned reflects the text in the title bar of the FrontPage application window, which consists of the application name and the URL of the specified WebWindowEx object, such as "Microsoft FrontPage – C:\MyWebs\Adventure Works". The following statement returns the value of the Caption property of the WebWindowEx object.

  thisCaption = WebWindow.Caption

Use the Close method to close a WebWindowEx object. The following statement closes the specified WebWindow.

  Set myWebWindowOne = WebWindows(0)
myWebWindowOne.Close

Use the ViewMode property to return or set one of the values shown in the following table. You can also use these enumerated values to switch views in FrontPage.

Enumermated Constant Value Corresponding View in FrontPage
FpWebViewLinks 0 Hyperlinks view
FpWebViewFolders 1 Folders view
FpWebViewStructure 2 Navigation view
FpWebViewPage 3 Page view
fpWebViewAllFiles 4 View a list of every file in Reports view
FpWebViewTodo 5 View a To Do list in Tasks view
FpWebViewBrokenLinks 6 View a list of broken hyperlinks in Reports view
FpWebFiewSiteSummary 7 Site Summary view in Reports view

The following statement sets the ViewMode property to fpWebViewPage.

  WebWindows(0).ViewMode = fpWebViewPage

Use the Visible property to return or set a boolean value for the state of a WebWindowEx object. The Visible property returns True if a WebWindowEx object is visible. The following statement sets a WebWindowEx object to an invisible state.

  WebWindow.Visible = False

Use the Web property to return information about the WebEx object. The following statement returns the number of properties for the specified web.

  myProperties = ActiveWeb.WebWindows(0).Web.Properties.Count