04
Feb
10

Establishing a Reference to InfoPath SemiTrust and InfoPath Xml Interop Libraries in VSTA

If you are attempting to use the namespaces

using Microsoft.Office.Core;
using Microsoft.Office.Interop.InfoPath.SemiTrust;
using Microsoft.Office.Interop.InfoPath.Xml;

in your VSTA project, you’ll find that you need to include some references. 

In order to get the Interop references, you may need to download and install Office 2003/2007 Primary Interop Assemblies (PIA) redistributable package.  You also want to make sure you have the .NET Programmability Support and VSTA installed for InfoPath.  You can use Add/Remove Programs in Office 2007 to insure you have .NET Programmability Support/Visual Studio Tools for Applications installed.

Add/Remove Programs showing interop assembly entries

image

Add/Remove features on Office 2007 showing InfoPath section

image

Now you need to add the references.  You’ll find the DLLs you need to reference in \Program Files\Microsoft Office\Office12.  Microsoft.Office.Interop.InfoPath.SemiTrust.dll and Microsoft.Office.Interop.InfoPath.Xml.dll.

.image

You can use the browse feature when adding the reference to find the DLLs.

image

The reference to Microsoft.Office.Core is from either the Microsoft Office 11.0 Object Library (Office 2003) or the Microsoft Office 12.0 Object Library (Office 2007).

image

 Happy automating!

Advertisement

0 Responses to “Establishing a Reference to InfoPath SemiTrust and InfoPath Xml Interop Libraries in VSTA”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

February 2010
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
Support Wikipedia

%d bloggers like this: