InfoPath Solutions

Visual Studio provides project templates you can use to create application-level add-ins for Microsoft Office InfoPath. You can use these solutions to automate InfoPath, extend InfoPath features, or customize the InfoPath user interface (UI).

Applies to: The information in this topic applies to application-level projects for InfoPath 2013 and InfoPath 2010. For more information, see Features Available by Office Application and Project Type.

Application-level add-ins for InfoPath are similar to 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 application-level add-ins, see Getting Started Programming Application-Level Add-Ins and Architecture of Application-Level Add-Ins.

Note

Visual Studio 2013 does not include the InfoPath form template projects that were provided in previous versions of Visual Studio. You also cannot use Visual Studio 2013 to open or edit an InfoPath form template project that was created in a previous version of Visual Studio. However, you can open and edit an InfoPath form template project by using Visual Studio Tools for Applications. For more information, see Working with VSTO 2008 Projects in InfoPath 2010..

Automating InfoPath by Using an Add-In

To access the InfoPath object model from an Office 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 Application object that represents the current instance of InfoPath. For more information, see Programming Application-Level Add-Ins.

When you call into the InfoPath object model from an 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 add-in and the COM object model in InfoPath. All types in the InfoPath primary interop assembly are defined in the 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 and Office Primary Interop Assemblies.

Customizing the User Interface of InfoPath by Using an Add-In

When you create an 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.

See Also

Tasks

How to: Create Office Projects in Visual Studio

Reference

Office Primary Interop Assemblies

Concepts

Getting Started Programming Application-Level Add-Ins

Office Solutions Development Overview

Architecture of Application-Level Add-Ins

Writing Code in Office Solutions

Other Resources

About the Microsoft Office InfoPath Primary Interop Assembly

Programming Application-Level Add-Ins

Office UI Customization

InfoPath 2010 in Office Development