OnAfterImport Event

Microsoft Office InfoPath

Occurs after the import (or merge) operation has successfully completed.

Function XDocument::OnAfterImport(ByRef pEvent As DocEvent)

pEvent Required DocEvent. A reference to the DocEvent object.

Remarks

This event handler does not allow users to cancel an operation.

If the merge operation includes merging multiple forms, the OnAfterImport event occurs only after all forms have been merged and the complete operation is successful.

Note  The OnAfterImport event handler cannot be created using Microsoft Office InfoPath 2003 design mode; it must be created manually.

ShowCreating the OnAfterImport event handler

Example

In the following example, the OnAfterImport event handler is used to display a message box that informs the user that the merge operation completed successfully:

function XDocument::OnAfterImport(eventObj)
{
   XDocument.UI.Alert("Merge operation was successful.")
}