Creating a Word document using pages from Visio

Started by Dan, November 27, 2008, 08:08:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dan

I have graphics that I need to append to a Word document as an Appendix. Is there a way to extract/export the pages in Visio directly in a Word document (ie. each page in Visio becomes it's own page in a Word document - or something similar?)

wapperdude

Usually, just copy the drawing contents from a Visio page and paste it (or paste special) onto a Word document page.  Pasting as a Visio drawing will preserve all of the Visio functionality if you double click on the drawing in Word.

HTH
Wapperdude
Visio 2019 Pro

Dan

Yup, you are right. However, I want to save myself the hassle of copying and pasting a ton of different pages. I'm looking to see if there's a way of automating the process of creating a Word document.

vojo

could embed the document in the appendix...wont see anything visually,  but reader could launch the visio doc and see the details.

Any kind of automation will get complex  (which visio document, which page in the document, etc)
It is likely to end up as manual as doing copy paste.

I suppose you could try to print to PDF then use a PDF to word converter and see if you get a
useful word doc out of it.    My guess is that it will not be what you want and I would be really surprised if
you could edit any of the drawings using ANY tool.

joemako

This may be too simplistic for what you are trying to do, but you could have a simple macro that exports each page in the Visio to an EMF, and then in Word "Insert -> Picture -> from file" all of them at once.

Page rotation and margins may play a factor in how they are imported. For example, if it is landscape in Visio and portrait in Word with default margins, each image will need to be adjusted individually. So you will want to adjust your margins and page rotation in Word before importing.

Here is some rough code for a mass export:

Sub ExportPagesEMF()

Dim myPage As Page

    For Each myPage In Application.ActiveDocument.Pages
   
        Application.ActiveWindow.Page = Application.ActiveDocument.Pages.ItemU(myPage.Name)
        Application.ActiveWindow.Page.Export "C:\folder\" & myPage.Name & ".emf"
   
    Next myPage

End Sub