Visual Studio provides project templates you can use to create VSTO Add-ins for Microsoft Office InfoPath 2013 and InfoPath 2010. InfoPath is not available in Office 2016.
Applies to: The information in this topic applies to VSTO add-in projects for InfoPath. For more information, see Features Available by Office Application and Project Type.
VSTO Add-ins for InfoPath are similar to VSTO Add-ins for other Microsoft Office applications. These types of solutions consist of an assembly that is loaded by the application. End users can have access to the functionality of this assembly no matter which form or form template is open. For more information about VSTO Add-ins, see Getting Started Programming VSTO Add-ins and Architecture of VSTO Add-ins.
To access the InfoPath object model from an Office VSTO Add-in created by using Office development tools in Visual Studio, use the
Application field of the
ThisAddIn class in your project. The
Application field returns a T:Microsoft.Office.Interop.InfoPath.Application object that represents the current instance of InfoPath. For more information, see Programming VSTO Add-Ins.
When you call into the InfoPath object model from an VSTO Add-in, you use types that are provided in the primary interop assembly for InfoPath. The primary interop assembly acts as a bridge between the managed code in the VSTO Add-in and the COM object model in InfoPath. All types in the InfoPath primary interop assembly are defined in the N:Microsoft.Office.Interop.InfoPath namespace. For more information about the InfoPath primary interop assembly, see About the Microsoft Office InfoPath Primary Interop Assembly. For more information about primary interop assemblies in general, see Office Solutions Development Overview (VSTO) and Office Primary Interop Assemblies.
When you create an VSTO Add-in for InfoPath, you have several different UI customization options. The following table lists some of these options.
|Task||For more information|
|Create a custom task pane.||Custom Task Panes|
|Add custom tabs to the Ribbon in InfoPath.||Customizing a Ribbon for InfoPath|
For more information about customizing the UI of InfoPath and other Microsoft Office applications, see Office UI Customization.
About the Microsoft Office InfoPath Primary Interop Assembly
Getting Started Programming VSTO Add-ins
Office Solutions Development Overview (VSTO)
Architecture of VSTO Add-ins
How to: Create Office Projects in Visual Studio
Programming VSTO Add-Ins
Writing Code in Office Solutions
Office Primary Interop Assemblies
Office UI Customization
InfoPath 2010 in Office Development