![definition content control microsoft word definition content control microsoft word](https://d33v4339jhl8k0.cloudfront.net/docs/assets/556d88cbe4b027e1978e4558/images/5d1c6af404286369ad8d10db/file-3cFwVc7MSx.png)
![definition content control microsoft word definition content control microsoft word](http://www.newdesignfile.com/postpic/2009/09/calendar-schedule-icon_99687.png)
Gets a 32-bit integer that indicates the application in which the DropDownListContentControl 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. 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 DropDownListContentControl is one of eight types of content controls that you can use to design documents and templates in Microsoft Office Word.
![definition content control microsoft word definition content control microsoft word](https://image.slidesharecdn.com/word2013-templatecontentcontrol-140703074052-phpapp01/95/template-content-control-basics-microsoft-word-2013-4-638.jpg)
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 enable users to choose from a list of items or add their own text to the control, use a ComboBoxContentControl. To access the list of items in a DropDownListContentControl, use the DropDownListEntries property. VstoDoc.Paragraphs(1).Range.InsertParagraphBefore()ĭropDownListControl1 = ("dropDownListControl1")Ī DropDownListContentControl displays a list of items that users can select. If Me.Application.ActiveDocument Is Nothing Thenĭim vstoDoc As Document = (Me.Application.ActiveDocument) () ĭropDownListControl1 = ("dropDownListControl1") private .DropDownListContentControl dropDownListControl1 To use this code, paste it into the ThisAddIn class in your project, and call the AddDropDownListControlAtSelection method from the ThisAddIn_Startup method. This version is for an application-level add-in. DropDownListEntries.Add("Wednesday", "Wednesday", 2) DropDownListEntries.Add("Tuesday", "Tuesday", 1) Me.Paragraphs(1).Range.InsertParagraphBefore()ĭropDownListControl1 = Me.Controls.AddDropDownListContentControl("dropDownListControl1") Private Sub AddDropDownListControlAtSelection() () ĭropDownListControl1 = ("dropDownListControl1") ĭ("Monday", "Monday", 0) ĭ("Tuesday", "Tuesday", 1) ĭ("Wednesday", "Wednesday", 2) ĭropDownListControl1.PlaceholderText = "Choose a day" ĭim dropDownListControl1 As .DropDownListContentControl Private void AddDropDownListControlAtSelection() To use this code, paste it into the ThisDocument class in your project, and call the AddDropDownListControlAtSelection method from the ThisDocument_Startup method. This version is for a document-level customization. Users can select the name of a day of the week in the control. The following code example adds a new DropDownListContentControl to the beginning of the document. ContentControlBase IComponent ISupportInitialize IDisposable IBindableComponent Examples