Matthew Scott: Application Development using the Open XML File Formats

Play Matthew Scott: Application Development using the Open XML File Formats
Sign in to queue


In this video we talk with Matthew Scott, a developer on the Word team who takes us through the design and development of the Word 2007 Content Control Toolkit, an application that natively reads and writes Word documents saved in the Open XML file format.  This application has been released to the developer community on Codeplex as an open source project, with full C# source code.


The content control tookit is a real-world example of working with the new Office Open XML file formats via the new System.IO.Packaging API in the .NET 3.0 framework.  It’s also a very handy tool for developers, providing the ability to map content controls to custom XML nodes through a simple drag&drop interface.  Matt explains the architecture of the tool, shows how to use it, and then goes through some of the source code to demonstrate various best practices for Open XML


Project homepage

Open XML Developer Group

Brian Jones’s blog

Word team blog



Download this episode

The Discussion

  • User profile image

    Very nice. Working with openxml directly will make me a happy man. Smiley Its great to also get a hold of some real code to work with openxml.

  • User profile image
    Yeah, Matt's code is a good example of quality development around Open XML, and not just a quick hack somebody threw together.  As you can tell from the video, he's really into this stuff.

    Btw, if you need answers to any specific questions about Open XML development, post them in the forums on
  • User profile image
    In true Borat fashion, Very Nice!!!.
  • User profile image
    wow. matt seems like a great representation of quality microsoft talent. keep up the terrific work!
  • User profile image
    Good and clear presentation!. Big Smile

    Only thing is  I couldn't quite grasp the url for the open source tool for opening up docx files:s
  • User profile image
    nbradshaw wrote:
    Good and clear presentation!.

    Only thing is  I couldn't quite grasp the url for the open source tool for opening up docx files

    Thanks nbradshaw! You can download the tool from it's CodePlex project homepage here:

    The source code as well as documentation is also available for download from the Releases page.

  • User profile image
    Thanks- Great presentation

  • User profile image
    Matt, a great presentation and it helps me a lot on understanding Content Control features.

    In the presentation, you show a very complex sample document with a lot of content controls in it. Would you share the document with us so that we see some of really complex samples. If not, maybe give us some links that we can find similar docx with complex content controls.


  • User profile image
    Just found the video in the link from CodePlex. Great stuff and just what I was looking for. Informative and helpful.

    Only one criticism - you guys should really look into screen capture for your dems. Videoing a screen makes it very hard to read what you are seeing. Or is that just my eyesight and my age?
    Thanks Matt.
  • User profile image
    Hi Matthew,

    Do you have a good source for docx parsing?  I need chunk up sections between "Headers" and upload them to a SharePoint site.  Do you have anything I can use/reference for this?  I need to be able to parse out the formatting/Images associated with each Header section.  Thanks,
  • User profile image

    how do we bind images to image content control through customXml ?

  • User profile image
    Jeremy Adsitt

    Matthew, Thank you for the post.  It's really helpful and this is powerful technology.  The data in your example is a single item, I'm finding it very difficult to find documentation to see exactly how a customxml doc can be dropped into the package that has varying numbers of child elements (e.g. perhaps <order><item1>...<item2>.. etc ) that could display as a single row  in a table that is expanded or in say their own unique table.. any thoughts on where I might go to find an example of this?  Thank for all your help!!


  • User profile image

    How does Microsoft's decision to remove Custom XML affect this method of document injection? I have a working solution very popular with my customers based on the ideas presented in this post and others. I do not know what my options are now that Custom XML is to be removed? I would imagine that Content Controls are here to stay... the question is "what can I bind them to if not Custom XML"?

  • User profile image
    Matt Scott MSFT

    Hi Wadebee, Custom XML Parts will not be removed. So your solution might be safe. Here's more information:


  • User profile image
    Matt Scott MSFT

    Hi Jeremy


    Unfortunately there is no support for bound repeating tables.




  • User profile image
    Matt Scott MSFT
  • User profile image

    What a wonderful presentation!  As a lowly end user interested in making Word keep track of data and make use of data, I really appreciated the chance to listen in on the behind-the-scenes beauty of separating the form from the content. Really clear, really helpful.  Just thought you should know that even end users appreciate your work.

  • User profile image

    I'd really like to use the word content control toolkit for Word 2010. I'm not a programmer, and I don't understand how to install it based on the Archived package at dbe on Codeplex. Can anyone provide me a simple how-to? I see a whole lot of Visual studio files that I'm not familiar with organizing/compiling to a running program.

  • User profile image


    I have the same request as Toby.

    I need the Word content control toolkit to insert in a safe mode metadata information into a Word XML document. How is it possible to create an installer?

Add Your 2 Cents