
Breaking multi-page visio files into multiple files
The following code works for me. It copies the page in the active window
to a new document.You must adapt page height and width and perhaps some
other properties too.
Dim doc As Document
Dim sel As Selection
'select all shapes in active window
ActiveWindow.SelectAll
Set sel = ActiveWindow.Selection
' and copy selection into clipboard
sel.Copy
' add new document
Set doc = Application.Documents.Add("")
' get first page
Set newPage = doc.Pages(1)
' rename it
newPage.Name = "NewPage"
' now the active window shows the new doc
' paste the clipboard into it
ActiveWindow.Paste
Hope this helps
Stefan
Quote:
> I am trying to find an easy way to separate multiple pages
> in one visio file into separate single-page visio files.
> Does anyone have any ideas?