Script error message when you try to open a modal dialog box in InfoPath 2007

Article translations Article translations
Article ID: 977310 - View products that this article applies to.
Expand all | Collapse all


Consider the following scenario:
  • You follow the instructions in the MSDN article "UI.ShowModalDialog Method" ( to create a form in Microsoft Office InfoPath 2007.
  • You add an HTML resource file to the InfoPath form. This HTML resource file displays a modal dialog box.
  • You use a script in the modal dialog box to interact with the InfoPath 2007 form.
  • You try to open the modal dialog box on a computer that has Windows Internet Explorer 8 installed.
In this scenario, you cannot open the modal dialog box. Additionally, you receive the following error message:
An error has occurred in the script on this page.

Error: 'gobjXDocument.UI' is null or not an object


Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
To resolve this issue, you have to add a registry value. To do this, follow these steps:
  1. Click Start
    Collapse this imageExpand this image
    start button
    , click Run, type regedit, and then press ENTER.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Application Compatibility
  3. On the Edit menu, point to New, and then click DWORD Value.
  4. Type Infopath.exe, and then press ENTER.
  5. Right-click Infopath.exe, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Exit Registry Editor.


Article ID: 977310 - Last Review: November 26, 2009 - Revision: 1.0
  • Windows Internet Explorer 8
  • Microsoft Office InfoPath 2007
kbexpertiseinter kbtshoot kbsurveynew kbprb KB977310

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from