![]() Microsoft has made minor improvements to Content Controls in Word 2010, but in Word 2013 they increased its utility for using this for document generation by the inclusion of a Repeating Content Control. You add an XML file to the package and then insert elements from the XML as Content Controls. Content Controls can also be bound/mapped to XML. The various templates supplied with Microsoft Word 2007, 20 include Content Controls which prompt the user to add information from the keyboard. Content Controls are a little like Word Fields. ![]() Microsoft introduced Content Controls in Word 2007. However, you should test it thoroughly before putting anything like this into a production setting. You can download the sample files at the end of the article. The same templates and code that I used for the original blog worked adequately this time. more or a variable number of child nodes.īut in Word 2019, it is back in business and appears to be working correctly. I abandoned this article in 2017 when I found that the results were not consistent when the structure of the XML file became more complicated, i.e. I wrote this to apply to Word 2013 / 2016’s Repeating Content Controls. All Rights Reserved.This article shows how to create a complex structured Word 2019 Document from a template using XML as a data source. LockContentControl - prevents users from deleting the controlĮntering - ContentControlOnEnter - runs when the user clicks in the content control or when the cursor is moved into the content control programmatically.Įxiting - ContentControlOnExit - runs when the user clicks outside the content control or when the cursor is moved outside the content control pgrammaticallyĪdded - ContentControlAfterAdd - runs when the content control is added to the document as a result of a redo or undo operations.ĭeleting - ContentControlBeforeDelete - runs just before the content control is deleted from the document LockControls - prevents users from editing the control The text in the control remains in the document Temporary - remove the control from the document automatically after the user edits the control. Title - get or set the title that is displayed in the border of the content control when the user clicks on it PlaceholderText - get or set the temporary text that is displayed in the control until a user edits the control Text - get or set the text that is displayed in the control (Added in 2013) - If this control is opened up in Word 2007 it is displayed in a RichText control Use this to specify a set of cover pages, headers, page designs or other building blocks from the Quick Parts galleryĪllows the user to choose a specific building block Shows a gallery of formatted choices.Ĭan select items from a drop-down that displays items from existing galleries built-in to Word or from custom template no restriction on the number of itemsĬan only be a value selected from a drop-downĬontains a calendar control, limits text to a single paragraphĬan be arbitrary text or date selected from a drop-down date picker ![]() Text is restricted to a single paragraph with no formatting. Formatting can be saved by saving or closing the documentĬan be arbitrary text or a value selected from a drop-downĬontains a list of restricted choices defined by the template. Limits formatting changes to picture brightness and contrast.Ĭan display pictures in several different formatsĬontains a list that you can edit. PlainTextContentControlįills the content control with a single picture. The format is determined by the formatting around the content control Limited to content that has no formatting. When the cursor is placed insode a group control a border is displayed around the areaįormatting can be saved by loading, saving or closing the document. When you hover over a group with the mouse the area will be highlighted Provides an easy way to protect document content when it is combined with editable custom controls This is not a control for grouping other content controls.Ĭan contain other content controls plus other word objects, tables, graphics etcĬan be used to group content controls together and other document content to protect it from editing or deletion.Īllows you to protect an area of the document without having to apply protection to the whole documentĬan contain other content controls although problems found when adding no editable content controls into groups and then PDF'ing Represents a protected region that users cannot edit or delete.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |