Gets the name of the character style to use to format text in the RichTextContentControl. Gets or sets the default DataSourceUpdateMode for the ContentControlBase. Gets a 32-bit integer that indicates the application in which the RichTextContentControl was created. Gets a Application that represents the current instance of Microsoft Office Word. NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation. For documentation about this type in projects that target the.
WORD RICH TEXT CONTENT CONTROL GRAYED OUT CODE
NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. This documentation describes the version of this type that is used in Office projects that target the. For more information, see Content Controls. You can use content controls to prevent users from editing protected sections of the document or template, and you can also bind content controls to a data source. Content controls have a user interface (UI) that has controlled input like a form. The RichTextContentControl is one of eight types of content controls that you can use to design documents and templates in Microsoft Office Word. For more information, see Visual Studio Tools for Office Runtime Overview. It is not intended to be implemented in your code.
![word rich text content control grayed out word rich text content control grayed out](https://pitot.dietfit-medica.pl/templates/f16dc396e088c7c707eabe9d7479e7a2/img/91db979411ba6f604533591aaba9fc2f.jpg)
This interface is implemented by the Visual Studio Tools for Office runtime. To create a document region that can only contain text, use a PlainTextContentControl. You can apply a combination of formatting and styles to text in a RichTextContentControl. RichTextControl1 = ("richTextControl1")Ī RichTextContentControl can contain text as well as many other types of content, including tables, pictures, or other content controls. VstoDoc.Paragraphs(1).Range.InsertParagraphBefore() If Me.Application.ActiveDocument Is Nothing Thenĭim vstoDoc As Document = (Me.Application.ActiveDocument) private .RichTextContentControl richTextControl1 To use this code, paste it into the ThisAddIn class in your project, and call the AddRichTextControlAtSelection method from the ThisAddIn_Startup method. This version is for an application-level add-in. RichTextControl1.PlaceholderText = "Enter your first name" RichTextControl1 = Me.Controls.AddRichTextContentControl("richTextControl1") Me.Paragraphs(1).Range.InsertParagraphBefore() Private Sub AddRichTextControlAtSelection() RichTextControl1.PlaceholderText = "Enter your first name" ĭim richTextControl1 As .RichTextContentControl Private void AddRichTextControlAtSelection()
![word rich text content control grayed out word rich text content control grayed out](https://calebmonroey.files.wordpress.com/2022/07/image-36.jpg)
To use this code, paste it into the ThisDocument class in your project, and call the AddRichTextControlAtSelection method from the ThisDocument_Startup method. This version is for a document-level customization. The following code example adds a new RichTextContentControl to the beginning of the document. ContentControlBase IComponent ISupportInitialize IDisposable IBindableComponent Examples