33.2. Creating a Document-Level Customization

This section walks through the creation of a Word document customization. This demonstrates how to create a document-level customization complete with Word 2007 Content Controls and a custom Actions Pane.

Although this example uses Word 2007, if you do not have that version installed, you can still follow most of the instructions and create a document-level customization for Word 2003. Some features are not available in Word 2003, such as the Content Controls and the Ribbon.

33.2.1. Your First VSTO Project

When you create a document-level customization with Visual Studio 2008, you can either create the document from scratch, or jump-start the design by using an existing document or template. A great source of templates, particularly for business-related forms, is the free templates available from Microsoft Office Online at http://office.microsoft.com/templates/.

This example uses the Absence request form that is available under the Forms, Employment category. When you download a template from the Office Online web site using Internet Explorer, it will open a new document based on the template in Word. Save this document as a Word Template to a convenient location on your computer, as shown in Figure 33-2.

Next launch Visual Studio 2008 and select File New Project. Filter the project types by selecting Visual C# followed by Office, ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.