This documentation is archived and is not being maintained.

Application.UnregisterSolution Method

Office 2007
Uninstalls the specified Microsoft Office InfoPath 2007 form template.

Version Information
 Version Added:  InfoPath 2003



expression   An expression that returns a Application object.


NameRequired/OptionalData TypeDescription
bstrSolutionURIRequiredStringThe string that specifies the Uniform Resource Identifier (URI) of the form template.

Return Value


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.


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