Microsoft Office Tutorials and References
In Depth Information
Adding an ActiveX control to Microsoft Office Word 2007 programmatically
Adding an ActiveX control to Microsoft Office Word
In this example, let's add an ActiveX calendar control to the document-level
customization. In an earlier part of this topic, you have seen an example with
DateTimePicker . DateTimePicker is a Windows forms control, and the calendar
control that you are using in this example is an ActiveX control. This is to
demonstrate that ActiveX controls can be used for Office 2007 customization
when customizing using VSTO.
Open Visual Studio 2008, create a new Word 2007 Document project, and
name the solution as you desire.
Next, let's add the user control to be used for our solution. Right-click on the
project, and select Add | User Control . Name the user control UserControl1.cs
and click OK.
Next expand the Visual Studio Toolbox , right-click on the Toolbox and select
Choose Items from the context menu.