_Application3.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:
property System::Object ^ COMAddIns { System::Object ^ get(); };
public object COMAddIns { get; }
member this.COMAddIns : obj
Public 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.
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)
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)
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.