Share via


_XDocument4.Host property

Gets a System.Object that code running in a hosted instance of InfoPath can use to access the object model of the host application.

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

Syntax

'Declaration
ReadOnly Property Host As Object
    Get
'Usage
Dim instance As _XDocument4
Dim value As Object

value = instance.Host
Object Host { get; }

Property value

Type: System.Object
A System.Object that represents the method defined in the host application for accessing that application's object model.

Implements

_XDocument3.Host

Remarks

This property is only used for scenarios where InfoPath is hosted as a control in another application and code running in InfoPath needs to access the object model of the host application. By default, the value of this property is set to a null reference (Nothing in Visual Basic).

For a brief overview of hosting InfoPath in another application, see "The InfoPath Editor Hosted as a Control" in What's New for InfoPath Developers. For detailed information about hosting InfoPath as a control in another application, see the article titled "Hosting the InfoPath Form Editing Environment in a Custom Web Form" on the InfoPath Developer Portal on MSDN.

Because the Host property is new to Microsoft InfoPath, you must declare and cast to the _XDocument4 type to access this method. For more information, see How to: Use Microsoft.Office.Interop.InfoPath.SemiTrust Members That Are Not Compatible with InfoPath 2003.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

See also

Reference

_XDocument4 interface

_XDocument4 members

Host overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace