1 out of 1 rated this helpful - Rate this topic

Application.RegisterSolution Method

Office 2007
Installs the specified Microsoft Office InfoPath form template.

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.RegisterSolution(bstrSolutionURL, bstrBehavior)

expression   An expression that returns a Application object.

Parameters

NameRequired/OptionalData TypeDescription
bstrSolutionURLRequiredStringThe string that specifies 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.
bstrBehaviorOptionalStringDefault value is "overwrite". The string that specifies how the form template is to be installed. The only other valid value for this parameter is "new-only".

Return Value
Nothing

Remarks

If the form template has already been registered, and "new-only" is specified for the bstrBehavior parameter, the RegisterSolution method will return an error. If "overwrite" is specified, the form template's registration record will be overwritten.

Security Level 3: Can be accessed only by fully trusted forms.

Example

In the following Visual Basic for Applications (VBA) example, the RegisterSolution method of the Application object is used to install a form template:

Visual Basic for Applications
Public Sub InstallForm()

   Dim objIP As Object

   ' Create a reference to the Application object.
   Set objIP = CreateObject("InfoPath.Application")

   ' Register the InfoPath form template.
   objIP.RegisterSolution ("C:\\My Forms\\MyFormTemplate.xsn")
   MsgBox "The InfoPath form template has been registered."

   Set objIP = Nothing

End Sub



Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ