The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Office Development Samples


Visual Studio includes sample applications that demonstrate how to use the Microsoft Office developer tools to create Office solutions. The code in these samples illustrates the syntax, structure, and techniques used to build Office solutions.

For the most current samples, see MSDN Developer Samples: Learn Through Code on the Microsoft website.

System_CAPS_ICON_important.jpg Important

Microsoft provides the included samples "AS IS" with no warranties. The code in the samples is provided just to illustrate concepts. The provided code may not meet security requirements for any specific environment. We recommend that you add security and error-handling code to your projects to make them as secure and robust as you deem appropriate.

Excel Master Detail Data SampleDemonstrates how to retrieve data from a relational database or XML file and use that data in Excel.
Excel Document Protection Techniques SampleDemonstrates various techniques you can use to protect structural components of a worksheet to help to prevent users from accidentally deleting controls or otherwise changing important parts of your solution document.
Excel Data Analysis SampleDemonstrates an inventory management application that executes data analysis tasks in Excel using list objects, pivot tables, and charts.
Word Task Pane SampleDemonstrates how to create a basic custom task pane for Word.
Word Content Controls SampleDemonstrates how to bind Word content controls to database fields.
Outlook Form Region RSS Reader SampleDemonstrates how to use Outlook form regions to display the full content of articles from an RSS feed.
Ribbon Controls SampleThis sample demonstrates how to create a custom tab that appears on the ribbon of an Excel worksheet. This custom ribbon demonstrates most of the controls available in the Office Ribbon Controls group of the Visual Studio Toolbox.
UI Manager SampleDemonstrates how to create a ribbon customization, a custom task pane, and a custom form region for Outlook by implementing extensibility interfaces in a VSTO Add-in. Each instance of the ribbon, task pane, and form region can correctly communicate with each other.
VBA and VSTO Interoperability SampleDemonstrates how to call a method in a document-level customization for Excel from Visual Basic for Applications (VBA) code in the workbook.

This sample is only available online.

MSDN Developer Samples: Learn Through Code Samples
Common Tasks in Office Programming