How to Get a Visio Page Name in a Shape Report
Question details
A user needs to generate a Shape Report that identifies the specific page or tab containing each shape in the file.

- Product
- Microsoft Visio
- Device & OS
- not provided
- Scenario
- Generating a detailed Shape Report across a multi-page document to track the location of individual shapes.
- Observed behavior
- Visio does not provide a direct Shape property for the page name or page index to use in standard Shape Reports.
Ensure you have the Developer tab enabled in Visio to access the ShapeSheet, and save a backup copy of your diagram before modifying Master Shapes.
Use a User-Defined Cell in the ShapeSheet
Add a custom property to the master shape using the ShapeSheet and the PAGENAME() function to extract the page name into the report.
Since Visio does not natively include the page name in Shape Reports, you must create a custom variable in the shape's background data (ShapeSheet) that dynamically reads the current page.
Open your Document Stencil. Right-click the relevant master shape, and select 'Edit Master', followed by 'Edit Master Shape'.
Right-click the shape in the editing window and select 'Show ShapeSheet'. If the User-defined Cells section is missing, insert it. Add a new row and enter '=PAGENAME()' as its value. Close the ShapeSheet and update the master.
To force existing shapes on your drawing canvas to update and read the page name, temporarily rename the page tab at the bottom of the window, then rename it back to its original name.
Open the Shape Report wizard. When selecting the fields to include, check the 'Show All Properties' box. Find your new user-defined cell in the list, add it to the report, and generate the final document.

Use a VBA Macro Workaround
If editing the ShapeSheet is not feasible, use a Visual Basic for Applications (VBA) macro to write the page name into the Shape Data.
Switch to WPS Office for Seamless Diagramming and Document Creation
If you frequently encounter limitations with Microsoft Office tools or find them too complex, consider switching to WPS Office. It offers a lightweight, highly compatible alternative with intuitive tools for all your document needs.
- 1. Visit the Official Website: Go to the official WPS Office website on your device.
- 2. Download the Installer: Click the 'Free Download' button to get the latest version.
- 3. Install and Launch: Run the downloaded file and follow the simple on-screen instructions to start using WPS Office.

Frequently Asked Questions
Why doesn't the Visio Shape Report include page names by default?
Visio's built-in Shape Report wizard extracts data primarily from explicit Shape Data fields and standard geometry properties. It does not inherently pull contextual document properties like page names without a custom ShapeSheet function.
How do I enable the Developer tab to access the ShapeSheet?
Go to File > Options > Customize Ribbon. In the list of Main Tabs on the right side of the dialog box, check the box next to 'Developer' and click OK.
Will updating the Master Shape automatically change shapes already on my page?
Updating a Master Shape modifies future instances immediately. For existing shapes on the canvas to reflect the new '=PAGENAME()' formula, you must force a recalculation, which is easily done by renaming the page tab momentarily.
Can I report on the page index instead of the page name?
Yes. If you prefer the page number or index, you can use a different ShapeSheet function or a VBA script to query the page index instead of the PAGENAME() function.




