Common tasks in Office programming
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
This topic is designed to help you find the answers to the following categories of common questions about programming Office solutions by using Visual Studio.
Setup and general tasks
How to: Target Office applications through primary interop assemblies.
How to: Set up configuration information for an Office solution.
User interface customization tasks
Controls on documents and worksheets
Task panes in document-level customizations
Task panes in VSTO Add-ins
Ribbon customizations
Outlook form regions
Custom menus
Excel automation tasks
How to: Programmatically display a string in a worksheet cell.
How to: Programmatically apply styles to ranges in workbooks.
How to: Programmatically change formatting in worksheet rows containing selected cells.
How to: Programmatically search for text in worksheet ranges.
Word automation tasks
How to: Programmatically define and select ranges in documents.
How to: Programmatically search for and replace text in documents.
How to: Programmatically add rows and columns to Word tables.
Data tasks
Data-bound controls
Cached data in document-level solutions
Custom XML data
How to: Add custom XML parts to document-level customizations.
How to: Add custom XML parts to documents by using VSTO Add-ins.
Server-side document management tasks
Security tasks
Deployment tasks
How to: Publish a document-level Office solution to a SharePoint server by using ClickOnce.
How to: Install prerequisites on end user computers to run Office solutions.