Office code samples

Download Office code samples and applications. New samples are added frequently in JavaScript, C++, C#, and VB.NET so check back often.You can also download code samples for other products like apps for Office, apps for SharePoint, Windows Azure, Silverlight, SharePoint, Windows 8, Windows Phone, or explore the official Visual Studio 2010 C#, VB.NET, and 101 LINQ samples.
Each sample is licensed to you by the party distributing it. Microsoft does not guarantee the samples or grant rights for any sample distributed by a party other than Microsoft. Use of this site is subject to the Terms of Use.
Sort by: rss
141 results in vba [Clear]
Microsoft Office Developer Documentation Team

Microsoft Office Developer Documentation Team MSFT

Microsoft Office Developer Documentation Team samples are developed and tested by the Office Developer Documentation Team to ensure that you have a great experience.

View samples
- Microsoft
Learn how to create add-ins for Microsoft Word 2010, PowerPoint 2010, and Excel 2010 by using Visual Basic for Applications (VBA). Examine when VBA might be the best choice for your add-in and explore several sample tasks that can be included in VBA add-ins for Microsoft Office 2
4.5 Star
(4)
Updated 4/7/2011
Released 4/5/2011
7,480 Downloads
OneCode Team
The CSVstoVBAInterop project demonstrates how to interop with VBA project object model in VSTO projects.
4.5 Star
(2)
Updated 5/5/2011
Released 1/21/2011
12,024 Downloads
C#
OneCode Team
The VBVstoVBAInterop project demonstrates how to interop with VBA project object model in VSTO projects.
4 Star
(2)
Updated 5/5/2011
Released 1/21/2011
11,309 Downloads
VSTOTeam - Microsoft
This sample demonstrates how to call a method in a document-level customization for Microsoft Office Excel from Visual Basic for Applications (VBA) code in the workbook.
4 Star
(1)
Updated 2/19/2011
Released 2/18/2011
5,845 Downloads
VSTOTeam - Microsoft
This sample demonstrates how to call a method in a document-level customization for Microsoft Office Excel from Visual Basic for Applications (VBA) code in the workbook.
3 Star
(1)
Updated 9/7/2012
Released 9/7/2012
3,143 Downloads
VSTOTeam
This sample demonstrates how to call a method in a document-level customization for Microsoft Office Excel from Visual Basic for Applications (VBA) code in the workbook.
4 Star
(1)
Updated 9/7/2012
Released 4/3/2012
6,890 Downloads
Microsoft Office Developer Documentation Team

Microsoft Office Developer Documentation Team MSFT

Microsoft Office Developer Documentation Team samples are developed and tested by the Office Developer Documentation Team to ensure that you have a great experience.

View samples
- Microsoft
This sample shows how to iterate through the first notebook in Microsoft OneNote 2010, then its first section, and finally gets the first page and outputs the page content from a VBA host (excluding OneNote).This code snippet is part of the Office 2010 101 code samples project. T
5 Star
(2)
Updated 8/3/2011
Released 8/3/2011
1,257 Downloads
Zhodani101
I have a spreadsheet with VBA code that produces some data. This runs everyday but I wanted to avoid saving the code everyday; this is for confidentiality issues, storage space, or simply to avoid data to be lost if the code is run by mistake.The code I am using is an extension o
4.5 Star
(2)
Updated 10/15/2012
Released 10/15/2012
André Santo
This examples shows how to schedule an Access macro to run automatically, using the windows scheduler and a .bat archives.
No Star
(0)
Updated 6/25/2015
Released 6/25/2015
533 Downloads
OneCode Team - Microsoft
The VBAutomateWord example demonstrates how to write VB code to create a Microsoft Visio instance
5 Star
(1)
Updated 12/4/2012
Released 12/4/2012
4,823 Downloads

Couldn't find the sample you were looking for?

1 - 10 of 141 Items