MergeEventObject Interface
An event object that is used during an OnMergeRequest event.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
<GuidAttribute("096cd67b-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface MergeEventObject _
Inherits MergeEvent, DocReturnEvent, DocEvent
'Usage
Dim instance As MergeEventObject
[GuidAttribute("096cd67b-0786-11d1-95fa-0080c78ee3bb")]
public interface MergeEventObject : MergeEvent,
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, seeMergeEvent.
The MergeEvent object provides properties and methods that can be used during an OnMergeRequest event to programmatically interact with a form's underlying XML document and to determine merge properties such as the number of files being merged.
During a single merge forms operation, multiple OnMergeRequest events will occur. One OnMergeRequest event will occur for each file being merged.
The MergeEvent object is passed as a parameter to the OnMergeRequest event of an InfoPath form. The properties that it provides are available only during this event.
Examples
In the following example, the DOM property and ReturnStatus property of the MergeEvent object and the ImportDOM method of the XDocument object are used to import (merge) a form from the OnMergeRequest event handler:
[InfoPathEventHandler(EventType=InfoPathEventType.OnMergeRequest)]
public void OnMergeRequest(MergeEvent e)
{
thisXDocument.ImportDOM(e.DOM);
e.ReturnStatus = true;
}