Sdílet prostřednictvím


_ExternalApplication.NewFromSolution-Methode

Erstellt basierend auf der angegebenen Formularvorlage ein neues Microsoft Office InfoPath 2007-Formular.

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

Syntax

'Declaration
<DispIdAttribute(7)> _
Sub NewFromSolution ( _
    <InAttribute> bstrSolutionURI As String _
)
'Usage
Dim instance As _ExternalApplication
Dim bstrSolutionURI As String

instance.NewFromSolution(bstrSolutionURI)
[DispIdAttribute(7)] 
void NewFromSolution (
    [InAttribute] string bstrSolutionURI
)

Parameter

  • bstrSolutionURI
    Der Zeichenfolgenwert, der den URI (Uniform Resource Identifier) einer Formularvorlage angibt.

Hinweise

Die NewFromSolution-Methode kann nur verwendet werden, um ein neues Formular basierend auf einer bestehenden Formularvorlage zu erstellen. Sie kann nicht verwendet werden, um ein neues Formular basierend auf einem vorhandenen Formular zu erstellen. Um ein Formular von einem vorhandenen Formular zu erstellen, verwenden Sie New.

Wenn Sie die NewFromSolution-Methode verwenden, wird InfoPath geöffnet, und das neue Formular kann sofort ausgefüllt werden.

HinweisHinweis:

Sie können mithilfe von Close kein Formular schließen, das mit der NewFromSolution-Methode geöffnet wurde. Wenn ein Formular mit der NewFromSolution-Methode erstellt wird, ist der Name des Formulars noch nicht bekannt.

Beispiel

Im folgenden in der Programmiersprache C# geschriebenen Beispiel dient die NewFromSolution-Methode des ExternalApplication-Objekts zum Erstellen eines neuen Formulars basierend auf einem angegebenen Formular:

private void CreateFromFormTemplate()
{
 ExternalApplication infoPath = new ExternalApplicationClass();

 // Create an InfoPath form.
 infoPath.NewFromSolution(@"C:\My Forms\MyFormTemplate.xsn", 1);
}
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