In the process of developing PowerTools for Open XML v1.1, we've identified a number of issues around interrelationships in paragraph markup in word processing documents. (We knew of some issues; the testing of the PowerTools v1.1 brought additional issues to our attention.) The main purpose of the PowerTools for Open XML is to provide examples and guidance for dealing with issues such as these. Some time ago, I wrote a blog post detailing some of the ways that paragraph markup can have interrelationships to markup in other paragraphs, or to markup in other parts of the document. Today, Bob McClellan and I have updated that original post, providing a more complete list.
Note: PowerTools for Open XML v1.1 enables composing new documents from existing documents using two new cmdlets, Merge-OpenXmlDocument and Select-OpenXmlString. Merge-OpenXmlDocument takes the complications associated with interrelated markup into account when composing new documents, so that the newly assembled document is valid.
To summarize, here are all the blog posts associated with this issue:
The updated post Inserting / Deleting / Moving Paragraphs in Open XML Wordprocessing Documents documents interrelationships in paragraph markup in detail.
The post Move/Insert/Delete Paragraphs in Word Processing Documents using the Open XML SDK introduces the C# code that is the basis for the most important new functionality in PowerTools V1.1. This C# module takes interrelated markup into account when assembling new documents.
For information about PowerTools for Open XML v1.1, see Announcing the Release of PowerTools for Open XML v1.1.