_ExternalApplication.RegisterSolution Method
Installs the specified Microsoft InfoPath 2010 form template.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)
Syntax
'Declaration
Sub RegisterSolution ( _
bstrSolutionURL As String, _
bstrBehavior As String _
)
'Usage
Dim instance As _ExternalApplication
Dim bstrSolutionURL As String
Dim bstrBehavior As String
instance.RegisterSolution(bstrSolutionURL, _
bstrBehavior)
void RegisterSolution(
string bstrSolutionURL,
string bstrBehavior
)
Parameters
bstrSolutionURL
Type: System.StringSpecifies the Uniform Resource Locator (URL) of the form template. This parameter can be specified as a form definition (.xsf) file or a form template (.xsn) file.
bstrBehavior
Type: System.StringDefault value is overwrite. Specifies how the form template is to be installed. The only other valid value for this parameter is new-only.
Remarks
If the form template has already been registered, and the new-only value is used for the bstrBehavior parameter, the RegisterSolution method will return an error. If the overwrite value is used, the form template's registration record will be overwritten.
Examples
In the following example, which is written in the C# programming language, the RegisterSolution method of the ExternalApplication object is used to install a form template:
private void InstallForm()
{
ExternalApplication infoPath = new ExternalApplicationClass();
// Install the specified InfoPath form.
infoPath.RegisterSolution(@"C:\My Forms\MyFormTemplate.xsn", "overwrite");
}
Note
The above example assumes that the Microsoft.Office.Interop.InfoPath namespace is being used and that the Microsoft InfoPath 3.0 Type Library is referenced.