The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
The ImportContent method works well to append a Word document to the end of another Word document. But what approach should I take if I need to import the Word document into the middle of another Word document?
MRManikandan Ravichandran Syncfusion Team June 4, 2020 10:56 AM UTC
Hi Greg,
Thank you for contacting Syncfusion support.
The Word document is a flow document in which contents (paragraphs, tables, etc.,) will not be preserved page by page; instead the contents will be preserved sequentially section by section. Word viewer/editor renders the contents of the Word document page by page dynamically when opened for viewing or editing. This page wise rendered information will not be preserved in the saved file level. So, it is not feasible to find the specific page to insert the contents in the middle of Word document.
Alternatively, to achieve your requirement, we suggest you to set placeholder text in the Word document to find the specific paragraph and then insert contents of sub Word document (Template2) into the main Word document (Template1). Please find the sample application to meet your requirement and let us know if it helps: https://www.syncfusion.com/downloads/support/forum/154843/ze/F154843-31307278
Note: Please find the input Word document in “wwwroot” folder of above sample application.
In the above sample application, we have done the following things: 1. Loads the main Word document (Template1). 2. Find the place holder and split into two sections. 3. Loads the sub Word document (Template2). 4. Inserts all sections of sub Word document into main Word document (in between the split section). 5. Saves the main Word document.
Please let us know if you have any other questions. Regards, Manikandan Ravichandran