Edit

Share via


DocReturnEventObject Interface

Definition

An event object that is used during a Microsoft InfoPath load or submission event.

public interface class DocReturnEventObject : Microsoft::Office::Interop::InfoPath::SemiTrust::DocReturnEvent
[System.Runtime.InteropServices.Guid("096cd676-0786-11d1-95fa-0080c78ee3bb")]
public interface DocReturnEventObject : Microsoft.Office.Interop.InfoPath.SemiTrust.DocReturnEvent
type DocReturnEventObject = interface
    interface DocReturnEvent
    interface DocEvent
Public Interface DocReturnEventObject
Implements DocReturnEvent
Attributes
Implements

Examples

In the following example, the XDocument property of the DocReturnEvent object is used to display the source XML of a form's underlying XML document using the DOM property of the XDocument object:

[InfoPathEventHandler(EventType=InfoPathEventType.OnLoad)]
public void OnLoad(<span class="label">DocReturnEvent</span> e)
{
 thisXDocument.UI.Alert("The source XML: " + e.XDocument.DOM.xml);
 e.ReturnStatus = true;
}

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeDocReturnEvent.

The DocReturnEvent object provides the XDocument property that can be used within a load or submission event to programmatically interact with the data in a form's underlying XML document. It also provides the ReturnStatus property that is used to specify whether the event is successful.

The DocReturnEvent object is passed as a parameter to the OnLoad event and the OnSubmitRequest event of an InfoPath form. The properties that it provides are available only during these events.

Properties

ReturnStatus

Gets or sets a value indicating the return status of the OnLoad event and the OnSubmitRequest event.

(Inherited from DocReturnEvent)
XDocument

Gets a reference to the XDocument object that is associated with the DocReturnEventObject object during an OnLoad or OnSubmitRequest event.

(Inherited from DocReturnEvent)

Applies to