Note: Cross posted from Coding The Document.
Word 2007 has two built-in methods for tagging content. If you go to the developers tab you will find the ribbon has a section for Controls and a section for XML. The Controls are also referred to as Content Controls. The XML section allows you to define schemas that can be applied to your document and is sometimes called Custom XML.
Both of these constructs can be used when you are coding an application which needs to identify a part of a document and take some action on it. The Content Controls are represented by SdtBlocks and SdtRuns in the Open XML SDK 2. Where as, the Custom XML is represented by CustomXMLBlocks and CustomXMLRuns.
The Content Controls made for a lot of confusion when I first investigated using them since there are multiple types. For my purposes only one really makes sense and that is the Rich Text. It can be applied to any area of a document regardless of content. Even with this capability I found that Content Controls didn’t fit my needs.
I realize that Microsoft views Custom Controls as more reliable because they are not tied to a schema that defines an strict document, but that isn’t how we use the schema. Our schemas are a list of custom identifiers which the users can reliably apply to a document.
As an example, the name of a company may need to be inserted 100 times in random locations throughout a document. This doesn’t fit a tightly structured schema, but it is also a risky to have the person editing the template enter an identifier by hand for each Content Control.
Accurate naming is just as important if not more important than identifying the type of objects contained in a tag when processing a template. Add to this the fact that you may need to identify sections by business usage and can contain multiple child objects such as charts, tables, images and paragraphs.
Between law suites and a change in approach by Microsoft it seems that Custom XML is going away. Microsoft needs to supply more guidance as to what approaches should be taken for marking up templates in a consistent fashion. They also need to come up with a solution for what I see as major a major weakness of Content Controls for this type of usage.
Lastly, both features are only available in Word. We do more template work with PowerPoint than we do Word which puts our development at a disadvantage. People want this data to “present” and therefore need be able to generate “presentations”. Getting similar functionality in PowerPoint is essential. Hopefully we will see these improvements going forward.