What are the benefits of MS Word content controls?

孤街浪徒 提交于 2019-12-05 21:12:59

Well after 2 days of research, here's what I found.

Content Controls are the next step in evolution from the old bookmarks..

  1. Protection - you can protect content-controls in your document such that the user cannot edit them. e.g. the terms of the contract may not be editable like the rest of the doc
  2. Data binding - you can create 'forms' in a word doc with content controls that bind to a custom xml via a visual designer. 2-way: Changing the xml updates the controls in the word doc and vice versa. Throw in an xml schema for your xml and you can have user-input validation as well. Content Controls can bind to individual xml nodes via XPath.
  3. Events - content controls expose events that you can handle to do custom processing.
  4. Document auto-generation - With some knowledge of the IO.Packaging namespace, the Open XML specs + Visual Studio, You can create a skeleton document and then churn out actual documents (e.g. invoices) by supplying a different data store/object (custom xml). You can also do something like .net 'DataTemplates' - e.g. This is how each order line item should look like.. repeat this for n line items in the xml

Best at-a-glance post: http://blogs.msdn.com/kathleen/archive/2007/06/20/my-favorite-feature-word-content-controls.aspx
Mike Ormond’s screencasts - http://blogs.msdn.com/mikeormond/archive/2007/05/24/office-open-xml-file-format-nuggets.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!