VstoDoc.Paragraphs(1).Range.InsertParagraphBefore()ĭatePickerControl1 = ("datePickerControl1")Ī DatePickerContentControl provides a calendar that enables users to select a date. If Me.Application.ActiveDocument Is Nothing Thenĭim vstoDoc As Document = (Me.Application.ActiveDocument) () ĭatePickerControl1 = ("datePickerControl1") private .DatePickerContentControl datePickerControl1 To use this code, paste it into the ThisAddIn class in your project, and call the AddDatePickerControlAtSelection method from the ThisAddIn_Startup method. This version is for an application-level add-in. Me.Paragraphs(1).Range.InsertParagraphBefore()ĭatePickerControl1 = Me.Controls.AddDatePickerContentControl("datePickerControl1")ĭatePickerControl1.DateDisplayFormat = "MMMM d, yyyy"ĭatePickerControl1.PlaceholderText = "Choose a date" Private Sub AddDatePickerControlAtSelection() () ĭatePickerControl1 = ("datePickerControl1") ĭatePickerControl1.DateDisplayFormat = "MMMM d, yyyy" ĭatePickerControl1.PlaceholderText = "Choose a date" ĭim datePickerControl1 As .DatePickerContentControl ![]() Private void AddDatePickerControlAtSelection() To use this code, paste it into the ThisDocument class in your project, and call the AddDatePickerControlAtSelection method from the ThisDocument_Startup method. ![]() This version is for a document-level customization. ![]() The example also modifies the format in which the control displays dates. The following code example adds a new DatePickerContentControl 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 |