InfoPathControl.Init method

Defines a method that must be provided by the developer to perform any initialization routines required when an instance of the control is added to an InfoPath form.

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

Syntax

'Declaration
Sub Init ( _
    pControlSite As InfoPathControlSite _
)
'Usage
Dim instance As InfoPathControl
Dim pControlSite As InfoPathControlSite

instance.Init(pControlSite)
void Init(
    InfoPathControlSite pControlSite
)

Parameters

Remarks

InfoPath calls the Init method when a user adds an instance of the control to a view. InfoPath passes an instance of the InfoPathControlSite object to the Init method when the control is initialized. The InfoPathControlSite object provides the Node property that provides access to the XML DOM node to which the control is bound, and the XDocument property for accessing the XDocument object associated with a form, which in turn provides access to the full InfoPath object model.

The InfoPathControl and InfoPathControlSite objects and their methods and properties are designed to be used only from the implementation of an ActiveX control. These objects and their members are not supported in InfoPath form code. For more information on how to create ActiveX controls that work with InfoPath, see the InfoPath Developer Center (https://msdn.microsoft.com/infopath).

See also

Reference

InfoPathControl interface

InfoPathControl members

Microsoft.Office.Interop.InfoPath namespace