Add document to Diagram via OLE

What is OLE object for Diagram?

The OLE technology provided by Microsoft allows to insert some other document content into the shape with size and coordinates which are previosly selected by X, Y, Width and Height of the currently editing Diagram page. For example, the Slides document can be inserted in the Diagram document inside of shape as was presented in the example below.

Add document to Diagram via OLE

GroupDocs.Merger provides an ability to add other single document as embedded document to Presentation. 
Here are the steps for it:

The following code sample demonstrates how to add other single document as embedded document to Diagram page:

String filePath = "c:\sample.vsdx";
String filePathEmbedded = "c:\embedded.pptx";
String filePathOut = "c:\output\result.vsdx";

int pageNumber = 2;
OleDiagramOptions oleDiagramOptions = new OleDiagramOptions(embeddedFilePath, pageNumber);

Merger merger = new Merger(filePath);


More resources

Advanced Usage Topics 

To learn more about document merging features, please refer the advanced usage section.

GitHub Examples 

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to merge your documents with our free online GroupDocs Merger App.