I did the same as you using OpenXmlSDK. Although I must say that it was not very fun, and I had only to want a solution that I did not need to cut out. In my case, I had to support footers and headers, etc. With the contents of the section and break the document into several other documents.
At that time, I could not find any patterns in determining the partition to which the element belonged, and I had to write a utility myself. (Separating collocation sections consists of introducing a section break after the content, and the SDK did not seem to provide any helpers.) Then I had to find the definition of the header using headerReference and capture this content before creating a new document and entering the contents of the header, bottom footer and section.
Wish you luck!
source share