Editing Office documents using Open XML SDK 2.0

In SharePoint 2010 Office documents are now much more integrated, such that you can have for example a "Slide library" document library in a publishing SharePoint site. That contains reusable slides for PowerPoint and this library can be updated from the users PowerPoint client.

However when migrating these documents to a new SharePoint platform, you can be posed with the issue of updating the static URL reference from the old library to the new one.

Thankfully Microsoft provide something called the Open XML SDK and you can find great tutorials and documentation here.

The SDK includes the dlls required to interact with any xml based Office document (docx/pptx/xlsx etc.) and also a reflector tool that can reflect the Office document into the C# code to create it. This is highly useful for stepping through the document object model to see what is inherited and how to make changes. I'm still perfecting the code to modify the reference to the SharePoint slide library, once I've got it I'll add to this post.