Page 1 of 1

Adding Visio's in MS-Word

PostPosted: Wed Jun 10, 2009 12:34 pm
by Sai Kumar
Hi ,

Is there any way that we could add a visio diagram into MS-Word by using docx4j. If so please guide me with the steps

Thanks
Regards
SK

Re: Adding Visio's in MS-Word

PostPosted: Wed Jun 10, 2009 2:20 pm
by jason
Hello SK

The ideal way to do it is probably to embed it as an OLE object.

In theory, this is quite easy. But when I tried doing it with a PDF, I found things didn't work as expected. See further How to create an oleObject.bin

If you are lucky, Visio embedding will be easier than PDF embedding. Try it and let us know how you go. To get a feel for what you are aiming for, drag your visio object into a Word document, then save the .docx (or easier .xml flat opc), then open it and have a look at the result. Unless you save as .xml, you'll need to unzip or use Package Explorer or docx4all view source to see the xml

A possible alternative would be to export the Viso object as say a png, and add that image to your document.

cheers

Jason

Re: Adding Visio's in MS-Word

PostPosted: Wed May 22, 2013 6:48 pm
by jason
Plutext now offers a commercial extension for docx4j/pptx4j/xlsx4j called docx4j OLE Helper, which makes it easy to use docx4j to programmatically embed or link files as OLE objects in a docx, pptx, or xlsx. Please email sales@plutext.com for more information.