All-In-One Office Development Code Samples

All-In-One Office Development Code Samples

Introduction

The All-In-One Office development code samples demonstrate the typical programming topics about Microsoft Office. These topics are either frequently asked in MSDN forums and Microsoft Support, or are requested by many developers via our code sample request function. We want to alleviate the frustration felt by developers when they are developing Office projects. 

 

Visual Studio 2008 Code Samples

Sample Description Download ReadMe
CppAutomateExcel The CppAutomateExcel example demonstrates how to write VC++ codes to create and automate a Microsoft Excel instance Download ReadMe.txt
CppAutomateOutlook The CppAutomateOutlook example demonstrates how to write VC++ codes to create and automate a Microsoft Outlook instance Download ReadMe.txt
CppAutomatePowerPoint The CppAutomatePowerPoint example demonstrates how to write VC++ codes to create and automate a Microsoft PowerPoint instance Download ReadMe.txt
CppAutomateVisio The CppAutomateWord example demonstrates how to write VC++ code to create and automate a Microsoft Visio instance Download ReadMe.txt
CppAutomateWord The CppAutomateWord example demonstrates how to write VC++ codes to create and automate a Microsoft Word instance Download ReadMe.txt
CppOfficeManagedCOMAddInShim The code sample demonstrates a VC++ shim for Office managed COM add-in Download ReadMe.txt
CSASPNETExcelImportExport The code sample demonstrates importing and exporting Excel worksheet in ASP.NET Download ReadMe.txt
CSAutomateExcel The CSAutomateExcel example demonstrates how to write VC# codes to create and automate a Microsoft Excel instance Download ReadMe.txt
CSAutomateOutlook The CSAutomateOutlook example demonstrates how to write VC# codes to create and automate a Microsoft Outlook instance Download ReadMe.txt
CSAutomatePowerPoint The CSAutomatePowerPoint example demonstrates how to write VC# codes to create and automate a Microsoft PowerPoint instance Download ReadMe.txt
CSAutomateVisio The CSAutomateVisio example demonstrates how to write C# code to create a Microsoft Visio instance Download ReadMe.txt
CSAutomateWord The CSAutomateWord example demonstrates how to write VC# codes to create and automate a Microsoft Word instance Download ReadMe.txt
CSExcelAutomationAddIn This project illustrates how to write a managed COM component which can be used as an Automation AddIn in Excel. Download ReadMe.txt
CSOfficeSharedAddIn The code sample demontrates creating a basic Office shared add-in Download ReadMe.txt
CSOutlookImportedFormRegion This code sample demonstrates how to import an Outlook Form Storage file (.ofs) to build a Outlook-look custom form in VSTO Download ReadMe.txt
CSOutlookRibbonXml CSOutlookRibbonXml provides the examples on how to customize Microsoft Outlook UI using the Ribbon XML. Download ReadMe.txt
CSOutlookUIDesigner CSOutlookUIDesigner provides samples on how to customize Microsoft Outlook UI using the VSTO Ribbon Designers. Download ReadMe.txt
CSVstoExcelWorkbook CSVstoExcelWorkbook provides the examples on how to customize Excel Workbooks by using the ListObject and the document Actions Pane Download ReadMe.txt
CSVstoGetWrapperObject The CSVstoGetWrapperObject project demonstrates how to get a VSTO wrapper object from an existing Office COM object Download ReadMe.txt
CSVstoServerDocument The project demonstrates how to use the ServerDocument class to extract information from a VSTO customized Word document or Excel Workbook Download ReadMe.txt
CSVstoVBAInterop The CSVstoVBAInterop project demonstrates how to interop with VBA project object model in VSTO projects. Download ReadMe.txt
CSVstoWordDocument This Sample demonstrates how to manipulate Microsoft Word 2007 Content Controls in a VSTO document-level project Download ReadMe.txt
VBAutomateExcel The VBAutomateExcel example demonstrates how to write VB codes to create and automate a Microsoft Excel instance Download ReadMe.txt
VBAutomateOutlook The VBAutomateOutlook example demonstrates how to write VB codes to create and automate a Microsoft Outlook instance Download ReadMe.txt
VBAutomatePowerPoint The VBAutomatePowerPoint example demonstrates how to write VB codes to create and automate a Microsoft PowerPoint instance Download ReadMe.txt
VBAutomateVisio The VBAutomateWord example demonstrates how to write VB code to create a Microsoft Visio instance Download ReadMe.txt
VBAutomateWord The VBAutomateWord example demonstrates how to write VB codes to create and automate a Microsoft Word instance Download ReadMe.txt
VBExcelAutomationAddIn This project illustrates how to write a managed COM component which can be used as an Automation AddIn in Excel. Download ReadMe.txt
VBOutlookImportedFormRegion This code sample demonstrates how to import an Outlook Form Storage file (.ofs) to build a Outlook-look custom form in VSTO Download ReadMe.txt
VBOutlookRibbonXml VBOutlookRibbonXml provides the examples on how to customize Microsoft Outlook UI using the Ribbon XML. Download ReadMe.txt
VBVstoExcelWorkbook The VBVstoExcelWorkbook provides the examples on how to customize Excel Workbooks by using the ListObject and the document Actions Pane Download ReadMe.txt
VBVstoGetWrapperObject The VBVstoGetWrapperObject project demonstrates how to get a VSTO wrapper object from an existing Office COM object Download ReadMe.txt
VBVstoServerDocument The project demonstrates how to use the ServerDocument class to extract information from a VSTO customized Word document or Excel Workbook Download ReadMe.txt
VBVstoVBAInterop The VBVstoVBAInterop project demonstrates how to interop with VBA project object model in VSTO projects. Download ReadMe.txt
VBVstoWordDocument This Sample demonstrates how to manipulate Microsoft Word 2007 Content Controls in a VSTO document-level project Download ReadMe.txt

Visual Studio 2010 Code Samples

Sample Description Download ReadMe
CSOfficeRibbonAccessibility This example illustrates how to P/Invoke the Microsoft Active Accessibilty (MSAA) API to automate Office Ribbon controls Download ReadMe.txt
CSOneNoteRibbonAddIn The example demonstrates how to create a VSTO add-in to customize the ribbon of Microsoft OneCode 2010 Download ReadMe.txt
VBOfficeRibbonAccessibility This example illustrates how to P/Invoke the Microsoft Active Accessibilty (MSAA) API to automate Office Ribbon controls Download ReadMe.txt
VBOneNoteRibbonAddIn The example demonstrates how to create a VSTO add-in to customize the ribbon of Microsoft OneCode 2010 Download ReadMe.txt

Download all code samples: https://1code.codeplex.com/releases

Submit your request of Office Development code samples (Guidance)