Microsoft Knowledge Base Email Alertz

(823436) - When you use the Open method for the ExternalApplication object in Microsoft Office InfoPath 2003, at run time you receive the following error message: Error: InfoPath cannot open the following test file: filename.xml. Access is denied. Code: 80043000...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 823436 - Last Review: October 4, 2011 - Revision: 1.0

BUG: "Access is denied" error message when you try to open a form with the ExternalApplication object in InfoPath 2003

On This Page

SYMPTOMS

When you use the Open method for the ExternalApplication object in Microsoft Office InfoPath 2003, at run time you receive the following error message:
Error: InfoPath cannot open the following test file: filename.xml. Access is denied.
Code: 80043000
Source: infopath

CAUSE

This problem occurs because of an InfoPath security check. You receive this error if the form template is stored on a network share instead of on your local computer.

WORKAROUND

To work around this problem, you can use the Microsoft Windows Script Host component (WScript.shell) to open the form programmatically. This workaround is described in more detail in the "More Information" section.

STATUS

Microsoft has confirmed that this is a bug in Microsoft Office InfoPath 2003.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Design a new, blank form template in InfoPath.
  2. Save the template as Test.xsn to a network share that you have write access to.
  3. On the File menu, click Fill Out a Form. In the Fill Out a Form task pane, select test.
  4. On the File menu, click Save. Save the form to your local computer as C:\testform.xml.
  5. Quit InfoPath.
  6. Start Notepad, and then copy the following script to a new file that you name Test.js.
    objIP = new ActiveXObject("InfoPath.ExternalApplication")
    //Open an InfoPath form.
    objIP.Open ("C:\\testform.xml")
  7. In Windows Explorer, double-click Test.js to run the script.

    Note You receive the run-time error message that is mentioned in the "Symptoms" section.
To work around this problem, replace the script in Test.js with the following script:
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("c:\\testform.xml");
Now when you run the script, InfoPath opens Testform.xml without error.

APPLIES TO
  • Microsoft Office InfoPath 2003
Keywords: 
kbbug KB823436
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate