How to edit docx ContentTypes ("<w:DataBinding") so that data is viewable in Word 2003 and 2007 RRS feed

  • Question

  • We have a solution in Sharepoint that uses templates with Content Types to create boilerplate documents. The content types are populated using the CodeCounsel.Office.DatabindingToolkit.

    Our issue is that the content type values do not display when using Word 2003.  We are using the converter so that Word 2003 can read docx files, but the content types are continually represented by their name (such as "Customer_FirstName") and not the value which that content type is supposed to display.

    I see that in the docx files, the data fro the content types is stored in an xml file, and that file is still there. I have determined that i can edit the <w:t> element in the <w:sdt> tag which hosts the databinding control. I am not sure if that is the best solution though, meaning if it will have side effects when the document is opened in either Word 2003 or Word 2007.

    I would appreciate advice/suggestions with this regard.

    Tuesday, July 21, 2009 5:24 PM

All replies

  • Are you able to modify the document before it gets opened in Word 2003? If so, you might want to use the Open XML SDK to store the content of the bound content control within the main document part. That is, don't rely on the databinding, but rather manually add the data yourself. That way you avoid any issues with bound content controls in previous versions of Word.

    Zeyad Rajabi (MS)
    Thursday, July 23, 2009 4:33 AM