Sdílet prostřednictvím


_ExternalApplication.Quit-Methode

Beendet die Microsoft Office InfoPath 2007-Anwendung.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)

Syntax

'Declaration
<DispIdAttribute(1)> _
Sub Quit
'Usage
Dim instance As _ExternalApplication

instance.Quit
[DispIdAttribute(1)] 
void Quit ()

Hinweise

Wenn Sie die Close-Methode verwenden, bevor Sie die Quit-Methode verwenden, werden geänderte Formulardaten nicht gespeichert, und die Benutzer werden auch nicht aufgefordert, das Formular zu speichern. Wenn Sie jedoch nur die Close-Methode und nicht die Quit- Methode verwenden, werden die Benutzer aufgefordert, das Formular zu speichern, bevor die InfoPath-Anwendung beendet wird.

Beispiel

Im folgenden in der Programmiersprache C# geschriebenen Beispiel dient die Quit-Methode des ExternalApplication-Objekts zum Schließen von InfoPath:

private void AutomateInfoPathForm()
{
 ExternalApplication infoPath = new ExternalApplicationClass();
 // Open an InfoPath form.
 infoPath.Open(@"C:\My Forms\Form1.xml", 1);

 // Close the InfoPath form.
 infoPath.Close(@"C:\My Forms\Form1.xml");

 // Quit the InfoPath application.
 infoPath.Quit();
}
HinweisHinweis:

Beim vorstehenden Beispiel wird davon ausgegangen, dass der Microsoft.Office.Interop.InfoPath-Namespace verwendet und auf die Microsoft InfoPath 2.0-Typbibliothek verwiesen wird.

Siehe auch

Referenz

_ExternalApplication-Schnittstelle
_ExternalApplication-Member
Microsoft.Office.Interop.InfoPath-Namespace