Once you are done changing the properties, click on OK to save these changes. If you want users to modify the content control but not delete it then check the box next to Content Control cannot be deleted. There are content control options available in the Locking section that prevent them from being deleted or edited. You can change the color to any color of your choice or keep it Automatic.Ĭheck the box next to Use a style to format text typed into the empty control and choose a style from the dropdown box next to Style. The text that you enter into a document via File>Info>Properties, is displayed in the document by means of a Plain Text Content Control. Using the dropdown list next to Show as you can either choose Bounding Box, Start/End Tag, or None to control the appearance of the content control in the document. You can now give a title in the textbox next to Title. With the rich text content control selected, click on the Properties button to open the Content Control Properties window. Next, click on the Design Mode button again to turn off the Design mode. The bounding box will have changed and you can now change the text within it to whatever you want. To modify the design of the content control, click on the Design Mode button in the Controls group to turn on the Design mode. This inserts a new field with a bounding box. Dim plainTextControl1 As .PlainTextContentControl Private Sub AddPlainTextControlAtSelection () Me.Paragraphs (1).Range. Next, click on the Rich Text Content Control box in the Controls group to add rich text content control. Then, select the Developer tab in the Ribbon menu. Click on a location in the document where you want to add a control. Insert and Change Rich Text Content Control Then tabbing will tab to the next row in the table. As a limited workaround for Rich Text content controls, you can place the control in a table. For Plain Text, Drop-Down, Combo Box and Date Picker controls, the Tab key will work as expected and tab to the next control. When you go back to Word you will see the Developer tab enabled in the Ribbon menu. You havent specified what type of content control youre using. I am working a word template which using plain text content control and XML mapping. On the right side, in the box below Customize the Ribbon, locate the Developer tab in the list of tabs displayed.Ĭheck the box next to Developer to enable the Developer tab. Conditional Text display with Plain text Content Control. Once the Word Options window is open, go to the Customize Ribbon tab in the left pane. The following example shows how you can update the Content Controls elements with the values from the mapped CustomXmlPart using the IContentControl.Update method.Then, select the Options tab to open the Word Options window. 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). New SpecialCharacter(document, SpecialCharacterType.LineBreak),Įnd Module Content Controls with XML MappingĬontent Controls can be mapped to XML nodes from DocumentModel.CustomXmlParts. 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"))Ĭ(New ContentControlListItem("GemBox.Imaging", "GBI")) 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, But youll want to turn the display of hidden text on in the Word UI in order to see the. Now, as long as the Print option to print hidden text is not active, the placeholder text wont print. Create named Plain Text Content Control. In the Font dialog box, click the checkbox for 'Hidden' until you see a checkmark. 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. If using the Professional version, put your serial key below.ĬomponentInfo.SetLicense("FREE-LIMITED-KEY") I am trying to create a document that will display three different text messages when a numeric value, either selected from a drop-down list content control or typed into a rich text content control, is either below a certain value, above a certain value, or between two values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |