Application.UnregisterSolution Method

InfoPath Developer Reference

Uninstalls the specified Microsoft Office InfoPath 2007 form template.

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.UnregisterSolution(bstrSolutionURI)

expression   An expression that returns a Application object.

Parameters

Name Required/Optional Data Type Description
bstrSolutionURI Required String The string that specifies the Uniform Resource Identifier (URI) of the form template.

Return Value
Nothing

Remarks

If the form template cannot be unregistered, the UnregisterSolution method will return an error.

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

Example

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

Visual Basic for Applications
  Public Sub UninstallForm()

Dim objIP As Object

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

' Unregister the InfoPath form template. objIP.UnregisterSolution ("C:\My Forms\MyFormTemplate.xsn") MsgBox ("The InfoPath form template has been unregistered.")

Set objIP = Nothing

End Sub

See Also