_XDocument3.CloseDocument method

Closes the form.

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

void CloseDocument()

Calling the CloseDocument method is equivalent to calling the Close method of the XDocumentsCollection collection.

In the following example, the CloseDocument method of the XDocument object is used to close the current form.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisDoc.CloseDocument();
Show: