![microsoft word picture content control microsoft word picture content control](https://petri-media.s3.amazonaws.com/2016/04/Figure1.jpg)
![microsoft word picture content control microsoft word picture content control](https://www.thewindowsclub.com/wp-content/uploads/2021/07/rich-text-control.png)
Add a content control of type plain text using the Add method of ContentControlCollection class.To create a content control using custom placeholder text: Create a content control of type plain text and add static text to itĬontentControl cc_plainText = (ContentControlType.Text, false) Ĭc_plainText.Appearance = ContentControlAppearance.BoundingBox Ĭc_().Paragraphs.Add( "Robert King") Style paraStyle = ( "paraStyle", StyleType.Paragraph) ĭoc.().Paragraphs.Add( "Employee Name: ", paraStyle) GcWordDocument doc = new GcWordDocument() ĭoc.().Paragraphs.Add( "This sample demonstrates creation/insertion of content controls in a Word document") Add text to the content control using Add method of the ParagraphCollection class.Configure the content control by setting its properties.Create a content control of type plain text using the Add method of ContentControlCollection class.Add a paragraph using Add method of the ParagraphCollection class.Create a new Word document by instantiating the GcWordDocument class.It can be modified using the ContentControl class properties, and deleted using Delete method of the ContentControl class. In fact, there are various types of content controls which are represented by the enum ContentControlType and are explained below:Ī plain text control is restricted to write plain text only.Ī rich text control contains formatted text as well as other items like tables, pictures etc.Ī picture control displays a single image in the content control.Ī combo box can contain any arbitrary text and also displays a list of values which can be selected from a drop down.Ī drop-down list displays a list of items out of which only one can be selected.Ī date control provides a calendar for selecting a date.Ī check box provides the option to represent the binary state: checked or unchecked.Ī building block gallery allows to select from a list of building blocks to insert into a document.Ī group control represents a protected region which users cannot edit or delete.Ī repeating section control acts as a container for repeated items.Ī repeating section item specifies that the content control is a repeated item.Ī building block is a pre-designed and pre-formatted block of text and formatting.Īn equation specifies that the content control shall be of type equation.Ī bibliography specifies that the content control shall be of type bibliography.Ī citation specifies that the content control shall be of type citation.Īn external content entity picker control allows the user to select an instance of an external content type.ĭsWord allows you to add, modify, and delete content controls from a Word document. A content control can be created using the Add or Insert method of the ContentControlCollection class. Since the same address needs to be replicated over all the invite forms, this can be done by using Repeating Section content control. Also, in case the company address needs to be changed, the value of address field will be updated only in the Repeating Section control and it will automatically reflect in all the invite forms.ĭsWord library supports content controls which are represented by the ContentControl class. They provide the flexibility to position the content and deny or allow editing of controls.įor example, consider a scenario of a company event. Thousands of invite forms need to be generated which will have the company address by default. They are often used for creating templates and forms.
![microsoft word picture content control microsoft word picture content control](https://thegeekpage.com/wp-content/uploads/2015/11/combo-box-content-control-fillable-forms-offcie-2016.png)
DsWord provides different types of content controls that help in organizing the content of a document in a structured manner.