OpenXml get page number to which each paragraph

Central data 156 Reputation points
2021-10-28T03:58:30.2+00:00

I have a Word docx file and I want to retrieve all the paragraphs in OpenXml with c#.
I need to know:
1.-The number of pages of the Documents.
2.-The page number to which each paragraph belongs.

Can you show an example where the paragraphs of the document are read?

Microsoft 365 and Office | Open Specifications
Microsoft 365 and Office | Open Specifications
Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hung-Chun Yu 981 Reputation points Microsoft Employee Moderator
    2021-10-28T15:54:07.487+00:00

    Hi @Central data

    Thank you for contacting Microsoft Open Specifications Support. For how to question with OpenXml SDK, Stack Overflow would be the place. Make sure to tag your question with [openxml-sdk]

    Here is a post might be what you are looking for how-to-get-page-numbers-based-on-openxmlelement

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.