Sdílet prostřednictvím


_ExternalApplication.Close-Methode

Schließt das angegebene Microsoft Office InfoPath 2007-Formular.

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

Syntax

'Declaration
<DispIdAttribute(6)> _
Sub Close ( _
    <InAttribute> bstrDocumentURI As String _
)
'Usage
Dim instance As _ExternalApplication
Dim bstrDocumentURI As String

instance.Close(bstrDocumentURI)
[DispIdAttribute(6)] 
void Close (
    [InAttribute] string bstrDocumentURI
)

Parameter

  • bstrDocumentURI
    Der Zeichenfolgenwert, der den URI (Uniform Resource Identifier) eines Formulars angibt.

Hinweise

Die Close-Methode schließt das momentan geöffnete Formular, ohne die InfoPath-Anwendung zu beenden. Bei Verwendung der Close-Methode wird das Formular ohne weiteres geschlossen, d. h., an den Formulardaten eventuell vorgenommene Änderungen werden nicht gespeichert.

Beispiel

Im folgenden in der Programmiersprache C# geschriebenen Beispiel dient die Close-Methode des ExternalApplication-Objekts zum Schließen des gegenwärtig geöffneten Formulars:

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