![]() ![]() 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. ![]() 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() 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 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |