_XDocumentEventSink2_Event.OnAfterImport Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs after the import (or merge) operation has successfully completed.
public:
event Microsoft::Office::Interop::InfoPath::SemiTrust::_XDocumentEventSink2_OnAfterImportEventHandler ^ OnAfterImport;
event Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_OnAfterImportEventHandler OnAfterImport;
member this.OnAfterImport : Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_OnAfterImportEventHandler
Event OnAfterImport As _XDocumentEventSink2_OnAfterImportEventHandler
Event Type
Examples
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:
[InfoPathEventHandler(EventType=InfoPathEventType.<span class="label">OnAfterImport</span>)]
public void OnAfterImport(DocEvent e)
{
thisXDocument.UI.Alert("Merge operation was successful.");
}
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:
[InfoPathEventHandler(EventType=InfoPathEventType.<span class="label">OnAfterImport</span>)]
public void OnAfterImport(DocEvent e)
{
thisXDocument.UI.Alert("Merge operation was successful.");
}
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: There is no user interface (UI) in the InfoPath form design window for creating this event handler. To add this event handler to the project, include the InfoPathEventHandler attribute as it appears in the example.
Note: If you create an event handler for the OnAfterImport event of a form template, you must edit the form definition file (.xsf) to set the useScriptHandler attribute of the importParameters element to "yes" before it will run.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기