Skip to content

Instantly share code, notes, and snippets.

@Zhouxing-Su
Created May 16, 2017 12:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zhouxing-Su/b31ceae9086980927b52a560e39082b1 to your computer and use it in GitHub Desktop.
Save Zhouxing-Su/b31ceae9086980927b52a560e39082b1 to your computer and use it in GitHub Desktop.
Export all pages to high resolution .png images by importing this script into your .vsdx file and run it.
Attribute VB_Name = "ExportAllPages"
Sub ExportAllPagesToHighResolutionPng()
Application.Settings.SetRasterExportResolution visRasterUsePrinterResolution, 600#, 600#, visRasterPixelsPerInch
Application.Settings.SetRasterExportSize visRasterFitToSourceSize, 10.666667, 7.739583, visRasterInch
Application.Settings.RasterExportDataFormat = visRasterInterlace
Application.Settings.RasterExportColorFormat = visRaster24Bit
Application.Settings.RasterExportRotation = visRasterNoRotation
Application.Settings.RasterExportFlip = visRasterNoFlip
Application.Settings.RasterExportBackgroundColor = 16777215
Application.Settings.RasterExportTransparencyColor = 16777215
Application.Settings.RasterExportUseTransparencyColor = False
Dim page As page
For Each page In ThisDocument.Pages
page.Export (ThisDocument.Path & page.Name & ".png")
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment