There is a time for all good things to come to an end, and the time has come to shut down OpenXmlDeveloper.org.
Screen-casts and blog posts: Content on OpenXmlDeveloper.org will be moving to EricWhite.com.
Forums: We are moving the forums to EricWhite.com and StackOverflow.com. Please do not post in the forums on OpenXmlDeveloper.org. Instead, please post in the forums at EricWhite.com or at StackOverflow.com.
Please see this blog post for more information about my plans moving forward. Cheers, Eric
The WordOpenXML in Word 2007 has a lot of data that changes without changing something in the text itself of the style.
Is there a way to compare two WordOpenXML chunks using the OpenXML sdk? Can this be done with some other method?
Much of what changes is often RSID attributes. RSID attributes are there to facilitate merging diverged documents. If you don't have the need to merge two diverged documents, you can always safely remove those RSID elements and attributes. You can use the MarkupSimplifier to help. Take a look at:
Follow on Twitter
Yes, that is what I needed. But, my problem with the entire OpenXML SDK, is that it needs a WordProcessingDocument, which is loaded from an existing document. I needed it to work with a Word Ranges, which have a WordOpenXML string representation and compare it with another one.
Is there a way I can use the same methods for Ranges, and not just documents?
The XML that you get from Word Ranges is in the Flat OPC format. This post contains boilerplate code to take Flat OPC and convert it, so that you can open it as a WordprocessingDocument, and either use the strongly typed SDK OM or use LINQ to XML.
There is an MSDN article, Using Open XML to Improve Automation Performance in Word 2010 for Large Amounts of Data, that contains a complete example.