# Add document to Word processing via OLE This article explains how to embed a document into a Word processing document as an OLE object with GroupDocs.Merger for Python via .NET. ## What is an OLE object? OLE stands for "Object Linking and Embedding", a Microsoft technology that lets one document carry content produced by another application. For example, an Excel spreadsheet or a PowerPoint presentation can be embedded into a document edited in a word processor. All the related data then stays in one document, which is easy to share. ## How to add an OLE object to a Word document GroupDocs.Merger for Python via .NET inserts OLE objects into word processing documents of Microsoft Word and OpenDocument formats in three steps: 1. Create a `Merger` with the path to the Word processing document. 2. Call `merger.import_document()` with an [`OleWordProcessingOptions`](https://reference.groupdocs.com/merger/python-net/groupdocs.merger.domain.options/olewordprocessingoptions/) that names the file to embed and the page of the document to put it on. 3. Call `merger.save()` with the path of the result. The following example embeds a PDF file into a DOCX document as an OLE object: {{< tabs "add-document-to-word-processing-via-ole" >}} {{< tab "add_document_to_word_processing_via_ole.py" >}} ```python from groupdocs.merger import Merger from groupdocs.merger.domain.options import OleWordProcessingOptions def add_document_to_word_processing_via_ole(): with Merger("./input.docx") as merger: # Embed the PDF file on page 2 of the document page_number = 2 ole_options = OleWordProcessingOptions("./embedded.pdf", page_number) ole_options.width = 300 ole_options.height = 300 merger.import_document(ole_options) merger.save("./output.docx") if __name__ == "__main__": add_document_to_word_processing_via_ole() ``` {{< /tab >}} {{< tab "input.docx" >}} {{< tab-text >}} `input.docx` is a sample file used in this example. Click [here](https://docs.groupdocs.com/merger/python-net/_sample_files/developer-guide/import-documents/add-document-to-word-processing-via-ole/input.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "embedded.pdf" >}} {{< tab-text >}} `embedded.pdf` is a sample file used in this example. Click [here](https://docs.groupdocs.com/merger/python-net/_sample_files/developer-guide/import-documents/add-document-to-word-processing-via-ole/embedded.pdf) to download it. {{< /tab-text >}} {{< /tab >}} {{< /tabs >}} ### Explanation - **`OleWordProcessingOptions("./embedded.pdf", page_number)`**: the file to embed and the page of the target document to put it on, counting from 1. - **`width` and `height`**: the size of the object's picture in the document. ## API reference - [`Merger`](https://reference.groupdocs.com/merger/python-net/groupdocs.merger/merger/) — `import_document`, `save`. - [`OleWordProcessingOptions`](https://reference.groupdocs.com/merger/python-net/groupdocs.merger.domain.options/olewordprocessingoptions/) — the file to embed, its page, size and position. ## See also - [Import documents]({{< ref "merger/python-net/developer-guide/import-documents/_index.md" >}}) - [Merge Word documents]({{< ref "merger/python-net/developer-guide/merge/word.md" >}})