Share via


_Application3.COMAddIns property

Gets a Microsoft.Office.Core.COMAddIns object containing information about the COM Add-ins registered for the current InfoPath application.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property COMAddIns As Object
    Get
'Usage
Dim instance As _Application3
Dim value As Object

value = instance.COMAddIns
Object COMAddIns { get; }

Property value

Type: System.Object
A Microsoft.Office.Core.COMAddIns collection that contains information about the COM Add-ins registered for the current InfoPath application.

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 COMAddIns property to access the Microsoft.Office.Core.COMAddIns object, you must cast the object returned by the InfoPath COMAddIns property to the Office COMAddIns type as shown in the code example.

Examples

The following example accesses the first item in the COMAddIns collection that is returned by the ComAddIns property.

object objectReference = 1;

Microsoft.Office.Interop.InfoPath.Application app = 
   new Microsoft.Office.Interop.InfoPath.ApplicationClass();

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 New Microsoft.Office.Interop.InfoPath.ApplicationClass

Dim myCOMAddIns As Microsoft.Office.Core.COMAddIns = _
   DirectCast(app.COMAddIns, Microsoft.Office.Core.COMAddIns)

Dim myCOMAddIn As Microsoft.Office.Core.COMAddIn = _
   myCOMAddIns.Item(objectReference)

See also

Reference

_Application3 interface

_Application3 members

Microsoft.Office.Interop.InfoPath namespace