PRB: Permission Denied - Scripting ActiveX Documents (239636)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 4.01 SP1
  • Microsoft Internet Explorer (Programming) 4.01 SP2
  • Microsoft Internet Explorer (Programming) 5

This article was previously published under Q239636

SYMPTOMS

When scripting to an ActiveX Document like Word, Excel, or a Visual Basic document, the following error message appears:
Permission Denied.

CAUSE

For security reasons, Internet Explorer does not allow scripting of ActiveX Documents.

STATUS

This behavior is by design.

MORE INFORMATION

ActiveX Controls (OCX) can be placed on a HTML page and be scripted. However, the same is not applicable for ActiveX Documents (VBD) or other ActiveX documents like Microsoft Word Documents or Excel Spreadsheets.

An ActiveX Document created by Microsoft Office like Microsoft Word, Excel, and cannot be scripted from an HTML frame.

Active Documents in Microsoft Word and other Active documents have object models that might be unsafe, such as accessing a hard drive or saving files. Also, there is no way to sign an Active document, so Internet Explorer prevents access to an Active Document from within a frame page script for security reasons.

Assuming the following code is belongs to a frameset page. The source of frames(1) is a Microsoft Word Document:
<HTML>
  <HEAD>
    <TITLE>frame1</TITLE>
    <SCRIPT LANGUAGE="VBSCRIPT">
      Msgbox top.frames(0).document.title
      Msgbox top.frames(1).document.title
    </SCRIPT>
  </HEAD>
  <BODY>
  </BODY>
</HTML>
				
The first message box appears showing the title "frame1". And then an error message appears stating "member not found".

REFERENCES

For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbActiveDocs kbprb KB239636