Embed word document in PowerPoint

Can we embed word documents in PowerPoint. If this functionality is supported then I would need the name of the class that we need to add in the AddOleObjectFrame() method. For embedding excel we use "Excel.Sheet.12". What do we use for inserting word document?

eg: slide.Shapes.AddOleObjectFrame(x, y, width, height, "Excel.Sheet.12", b);


This message was posted using Page2Forum from Frequently Asked Questions - Aspose.Slides for .NET and Java

Dear Mahima,

Thanks for considering Aspose.Slides.

You can find the class name from your registry. In case of Word document, you can look HKEY_CLASSES_ROOT.doc

There you will find Word.Document.12; so this is the class name.

So, it is possible to embed Word documents in PowerPoint slides and we can modify them as well.

When you embed any document as an OLE object, then you can modify them in MS-PowerPoint by double clicking it. Doing so, the PowerPoint will extract the document from OLE container and launch the relevant program inside its own process space, so you can modify it. For example, if it is a .doc document, PowerPoint will launch the Winword inside its process space or in case of .xls, it will launch the Excel program.

But if you want to modify the document programmatically, then Aspose.Slides cannot help you because at most Aspose.Slides can add/delete them out of OLE object container (frame). It does not know the contents of actual document or a way to manipulate it.


Let me tell you another way of finding the class name is to embed the document as an OLE object using MS-PowerPoint and then read that presentation using Aspose.Slides and inspect the class name property of OLEObjectFrame in Visual Studio Debugger.