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

Free Support Forum - aspose.com

Embed documents inside a Word doc?

I was wondering if it’s possible to embed other documents inside a Word document using Aspose.Words.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately you cannot insert or update OLE objects inside document. You can only extract embedded OLE objects using Aspose.Words.

Best regards.

Are there any plans to add this functionality? This seems like a very basic feature, and is quite easy to implement using Word OM…

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

OLE embedding is not implemented in Aspose.Words because this feature is quite complex and undocumented. This is not as easy as looks from the first sight. It is logged as #3050 in our defect database. We’ll notify you on any progress in its investigation and implementation. But I cannot promise any dates.

As workarounds you can try one of the following:

- inserting images or links instead of OLE objects;

- utilizing MS Word Automation;

- placing OLE objects in smaller documents by hand and then programmatically combining/inserting them into resultant documents.

Thank you for understanding.


Thanks for the prompt reply!

I've already implemented the 3rd suggestion, of inserting the objects into a small document using MS Word Automation, load that document using Aspose.Words, and import the objects into my documents.

This seems to work fine, but has at least 2 disadvantages that I'm currently aware of:

  1. It requires MS Word to be installed.
  2. It is not very efficient.

Best regards,
Itay Sagui

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sorry for inconvenience. We know this could be very useful to implement direct programmatical OLE object insertion. But as I wrote this needs much of research work. If you have restricted set of objects to embed this can be done manually as described in (3). Of course we’ll work on the problem further. But not right now.