Table of contents
Collapse the table of content
Expand the table of content

Window.Page Property (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Gets or sets the page that is displayed in a window. Read/write.


expression . Page

expression A variable that represents a Window object.

Return Value



You can set the Page property to a locale-independent page name (a universal name), a locale-specific page name (a local name), or a Page object.

If a window is not showing a page (perhaps because it is showing a master), the Page property returns Nothing . You can use the Type property of the Window object to determine whether the Window object is showing a page. Otherwise, the returned Variant refers to the Page object that the window is showing.

Beginning with Visio 5.0b, the Page property no longer returns an exception if a window is not showing a page; it returns Nothing . You can use the following code to handle both return values:

'Close Window(intCounter) if it is showing a page. 
Set vsoWindow = Windows(intCounter) 
On Error Resume Next 
Set vsoPage = vsoWindow.Page 

On Error GoTo 0 

If Not vsoPage Is Nothing Then 
End If 

Note In versions of Visio through version 4.1, the Page property of a Window object returned an Object (as opposed to a Variant of type Object ) and the Page property of a Window object accepted a String (as opposed to a Variant of type String ). Because of changes in Automation support tools, the property was changed to accept and return a Variant . For backward compatibility, the PageAsObj and PageFromName properties were added. The PageAsObj and PageFromName properties have the same signatures and occupy the same vtable slots as did the prior version of the Page property.

© 2018 Microsoft