Welcome to OpenXML Developer Sign in | Join | Help

Microsoft Word 2007 XML/Content Controls Question

Last post 08-19-2008, 7:40 AM by rezash. 3 replies.
Sort Posts: Previous Next
  •  05-29-2006, 5:54 PM 248

    Microsoft Word 2007 XML/Content Controls Question

    Hello. I am being tasked to create a demo application using WinFX and Office 2007 Beta 2. This is my first foray into Office programming so please forgive me if my question sounds stupid. As far as I can see, there are 2 ways to create a dynamic template file in Word 2007:

    (i) I can attach a schema file to the template. Using the XML Structure
    pane, I can then drag XML elements onto the form wherever I want my template
    to be populated with dynamic data.

    or

    (ii) I can create content controls within my template to act as placeholders
    for the dynamic data.

    I have noticed that I can also drag an XML element from a schema file within
    a rich text content control. I am confused about the difference between the
    usage of content controls, and the dragging and dropping of XML elements
    from an attached schema file. It seems to me that I would always use content
    controls, as they can be easily locked. Can somebody please clarify this for me. Thanks.

  •  05-31-2006, 7:48 PM 263 in reply to 248

    Re: Microsoft Word 2007 XML/Content Controls Question

    A response would be much appreciated.
  •  06-14-2006, 6:36 PM 291 in reply to 263

    Re: Microsoft Word 2007 XML/Content Controls Question

    Hey Wee,

    You've correctly identified the two ways you can map custom XML data into Word. Here's how I think of each seperate technology:

    • Custom XML markup is all about putting semantics to the presentation when the two are tightly tied (e.g. the whole document is a <book/>, the first 10 pages are a <introduction/>, etc.) In this case, you need to be able to mark up the presentation with semantics and the two are tightly coupled
    • Content controls are all about cases where you have data in your custom XML schema that defines pieces of the file (e.g. the metadata table on the first page, or each of the issues in the file, etc.) and you want to create a mapping betweem the two - you live in and work on your data, and the presentation is outside the scope of your tools except where you've defined mappings.

    The content controls do have additional granular control (i.e. editing/deletion protection, the ability to appear as common form controls, etc.) since they utilize the ability to be linked to seperate custom XML data. Hopefully this makes sense of why you'd use the two, and I'd love to hear your experience once you do.

    Tristan  

  •  08-19-2008, 7:40 AM 3577 in reply to 248

    Re: Microsoft Word 2007 XML/Content Controls Question

    Dear Sir ,
    May you please tell me how can I add content controls to a table's row in a word document by using open xml programatically ?

    Thanks alot .

View as RSS news feed in XML