How to extract pages between marker(bookmark) from the word document ?

I have a 19‑page Word document (docx). I placed a bookmark called bookmark_start on page 3 and another called bookmark_end on page 7. I need to extract pages 3 through 7 exactly as they appear, preserving the entire page layout rather than just extracting individual sections or paragraphs.
How to do it using sync fusion libraries. 


1 Reply

SR Sindhu Ramesh Syncfusion Team March 27, 2025 01:52 PM UTC

Hi Arjun,
Based on the details provided, we understand that your requirement is to retrieve bookmark content along with section properties. To achieve this, you can extract the content within a bookmark as a new Word document. This will include different sections and their properties like margins, orientation etc., Kindly refer to the sample below, which demonstrates how to get bookmark content as a Word document.
Get-bookmark-content-as-document-part

For more detailed information about working with bookmarks, kindly refer to the below UG:
Working with Bookmarks in .NET Word library | Syncfusion

Regards,
Sindhu Ramesh.


Loader.
Up arrow icon