How to Export All Microsoft Visio Pages as PNG Files
Question details
The user needs to export every page of a multi-page Microsoft Visio document into individual PNG image files simultaneously.

- Product
- Microsoft Visio
- Device & OS
- not provided
- Scenario
- Attempting to convert a complete multi-page diagram or flowchart document into standard image files for sharing or presentation purposes.
- Observed behavior
- Visio does not have a built-in standard command to batch export all pages. Using the default 'Save As PNG' option only exports the currently active page.
Ensure you have saved your current Visio document, and verify that macros are allowed to run in your Microsoft Visio Trust Center settings.
Use a VBA Macro to Batch Export Pages
Since Visio lacks a native batch export tool for images, running a simple VBA macro is the most effective way to loop through and export every page as a separate PNG file automatically.
By utilizing Visio's built-in Visual Basic for Applications (VBA) editor, you can automate repetitive tasks. A short script can iterate over all pages in the active document and trigger the export function for each one.
In Microsoft Visio, press the Alt + F11 keys on your keyboard to launch the Visual Basic for Applications (VBA) editor.
Click on 'Insert' in the top menu bar of the VBA editor and select 'Module' from the dropdown to create a blank script window.
Paste a standard Visio page-looping VBA script into the module. Ensure the script specifies '.png' as the target export format and defines your desired folder path.
Press the F5 key or click the green 'Run' button in the toolbar. The macro will execute, exporting each page of your document as a separate PNG file to the specified location.

Looking for a Seamless and Free Office Suite Alternative?
While specialized tasks like Visio diagram automation require Microsoft tools, WPS Office is an excellent, lightweight alternative for all your primary document, spreadsheet, and presentation needs, offering full compatibility and a familiar interface.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button for your specific operating system.
- 2. Install the Software: Open the downloaded setup file and follow the quick, simple installation prompts on your screen.
- 3. Start Creating: Launch WPS Office to instantly start opening, editing, and saving your documents, spreadsheets, and presentations.

Frequently Asked Questions
Can I use the same VBA method to export Visio pages as JPG files?
Yes. If you modify the script in the VBA editor to save with a '.jpg' extension instead of '.png', Visio will export all pages as JPEG files.
Why does the standard 'Save As' option only save one page?
Visio's default image export behavior is designed to capture only the currently active viewing pane or page to prevent unintentionally generating large amounts of image files from complex diagrams.
Do I need advanced programming knowledge to use this macro?
No. You simply need to copy a pre-written Visio export script from a trusted source, paste it into the Module window as described, and press F5 to execute it.
Will exporting to PNG preserve the transparent background of my Visio diagram?
This depends on your Visio export settings and the specific macro code used. By default, PNG supports transparency, but you may need to ensure your page background isn't set to solid white in Visio's page setup.




