We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert Visio diagram as OLE Object to Word document

I’m using Aspose.Diagram and Aspose.Words to Insert Visio diagram as OLE Object to Word document.
How I manually do this is:

  1. Open a vsd/vsdx file and press Ctrl+A Then Ctrl+C
  2. Switch to MS Word, press Ctrl+V
    By doing this, I get a MS Visio Diagram Object which doesn’t have any blank margin. And I can double click the diagram to edit it.

Now, I use Aspose.Words.DocumentBuilder.InsertOleObject(string fileName, bool isLinked, bool asIcon, Image presentation) to do the same thing, and I find it’s hard to handle the thumbnail image.
I try to covert a jpeg from the visio file using Aspose.Diagram, but I always get a image with obvious blank margin around the shapes.
Is there a way to finish the job just as same as manually do?


From the details shared by you, it seems like the topic is basically related to Aspose.Words. The only issue related to Aspose.Diagram you are facing is the image with an obvious blank margin around the shapes while converting Diagram into Image. Could you please share your sample Diagram with us so that we can test the scenario from this perspective and then we will move your inquiry to Aspose.Words if needed.

Well, I just give up and change another way.
I convert the shapes to a jpeg and cut the blank margin with my own algorithm using System.Drawing. Save time to enjoy the life


It is good to know that you were able to sort your issue out. Please feel free to create a new topic in case you face any issues.