Share via


SaveEventObject interface

An event that is used during OnSaveRequest.

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

Syntax

'Declaration
<GuidAttribute("096cd5f5-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface SaveEventObject _
    Inherits SaveEvent, DocReturnEvent, DocEvent
'Usage
Dim instance As SaveEventObject
[GuidAttribute("096cd5f5-0786-11d1-95fa-0080c78ee3bb")]
public interface SaveEventObject : SaveEvent, 
    DocReturnEvent, DocEvent

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, seeSaveEvent.

The SaveEventObject object provides a number of properties and methods that can be used during a save operation from the OnSaveRequest event handler to programmatically interact with a form's underlying XML document, determine save properties, and perform the save operation.

The SaveEventObject object is passed as a parameter to the OnSaveRequest event. The properties that it provides are available only during this event. This object expires when the form's save event expires so it may not be stored and used outside of the scope of the save event.

Examples

In the following example, the ReturnStatus property and the PerformSaveOperation method of the SaveEvent object are used to perform a standard Microsoft InfoPath save operation:

[InfoPathEventHandler(EventType=InfoPathEventType.OnSaveRequest)]
public void OnSaveRequest(SaveEvent e)
{
 e.PerformSaveOperation();
 e.ReturnStatus = true;
}

See also

Reference

SaveEventObject members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace