Application.ComAddIns Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Microsoft.Office.Core.COMAddIns object containing information about the COM Add-ins registered for the current InfoPath application.
public:
abstract property System::Object ^ ComAddIns { System::Object ^ get(); };
public abstract object ComAddIns { get; }
member this.ComAddIns : obj
Public MustOverride ReadOnly Property ComAddIns As Object
Property Value
A Microsoft.Office.Core.COMAddIns collection that contains information about the COM Add-ins registered for the current InfoPath application.
Exceptions
The form template is not configured for Full Trust using the Security and Trust category of the Form Options dialog box.
Examples
The following example accesses the first item in the COMAddIns collection that is returned by the ComAddIns property.
Object objectReference = 1;
Microsoft.Office.InfoPath.Application app =
this.Application;
Microsoft.Office.Core.COMAddIns myComAddIns =
(Microsoft.Office.Core.COMAddIns)app.ComAddIns;
Microsoft.Office.Core.COMAddIn myComAddIn =
myComAddIns.Item(ref objectReference);
Dim objectReference As Object = 1
Dim app As Microsoft.Office.InfoPath.Application = _
Me.Application
Dim myComAddins As Microsoft.Office.Core.COMAddIns = _
DirectCast(app.ComAddIns, Microsoft.Office.Core.COMAddIns)
Dim myComAddIn As Microsoft.Office.Core.COMAddIn = _
myComAddIns.Item(objectReference)
Remarks
The COMAddIns object returned by the InfoPath ComAddIns property is implemented in the Microsoft.Office.Core namespace. The Microsoft.Office.Core.COMAddIns object provides information about the collection of InfoPath COM add-ins that are registered in the Windows registry of the user's computer. To access the members of Microsoft.Office.Core namespace, you must first add a reference to the Microsoft Office 14.0 Object Library on the COM tab of the Add Reference dialog box in Visual Studio.
To use the Microsoft.Office.InfoPath.ComAddIns property to access the Microsoft.Office.Core.COMAddIns object, you must cast the InfoPath ComAddIns property to the Office COMAddIns type as shown in the code example.
This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.
This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.