It cannot contain other items, such as tables. Plain Text: A plain text content control is limited to plain text in a single or multiple paragraphs. Before Word 2013, rich text controls cannot be bound to an XML data node.
#Word rich text content control update
The following example shows how you can change the XML node in the custom XML part and update the content of Content Control based on that mapped XML node. A rich text control can contain custom formatted text or other items, such as tables, pictures, or other content controls. With GemBox.Document you can update the values separately in mapped XML ( CustomXmlPart.Data) and the content of Content Control ( BlockContentControl.Blocks or InlineContentControl.Inlines). Code: Dim oCC As ContentControl For Each oCC In ActiveDocument.ContentControls If oCC.TITLE 'title of control' Then whatever End If Next oCC. New SpecialCharacter(document, SpecialCharacterType.LineBreak),Įnd Module Content Controls with XML MappingĬontent Controls can be mapped to XML nodes from DocumentModel.CustomXmlParts. Code: Dim oCC As ContentControl Set oCC ActiveDocument.SelectContentControlsByTitle ('title of control').Item (1).Range.Text whatever. a Rich Text Content Control 3 entertext, graphics, & content controls 4. New Run(document, "☒") )Ĭ = Trueĭim comboBoxControl As New InlineContentControl(document, ContentControlType.ComboBox,Ĭ(New ContentControlListItem("", "NONE"))Ĭ(New ContentControlListItem("GemBox.Spreadsheet", "GBS"))Ĭ(New ContentControlListItem("GemBox.Document", "GBD"))Ĭ(New ContentControlListItem("GemBox.Pdf", "GBA"))Ĭ(New ContentControlListItem("GemBox.Presentation", "GBP"))Ĭ(New ContentControlListItem("GemBox.Email", "GBE")) 4 Type Green Cleaning in the Tag text box (Content Control Properties dialog. Var checkBoxControl = new InlineContentControl(document, ContentControlType.CheckBox, New Paragraph(document, "Plain Text Content Control with tag and title.")) Var plainTextControl = new BlockContentControl(document, ContentControlType.PlainText, Create named Plain Text Content Control. New Paragraph(document, "It cannot be deleted or edited.")) New Paragraph(document, "This text is inside Rich Text Content Control."), Var richTextControl = new BlockContentControl(document, ContentControlType.RichText, Create locked Rich Text Content Control.
#Word rich text content control serial key
If using Professional version, put your serial key below.ĬomponentInfo.SetLicense("FREE-LIMITED-KEY")