Executing Javascript in WebBrowser Control stopped working after upgrade to Access 2010

Posted by Noah on Stack Overflow See other posts from Stack Overflow or by Noah
Published on 2010-05-12T00:46:41Z Indexed on 2010/05/12 0:54 UTC
Read the original article Hit count: 527

BACKGROUND: The following works in Access 2007, but broke when I installed 2010

I have a WebBrowser control in an Access Form; I set its location as follows

Me.WebBrowser0.ControlSource = "http://foo.com"

and then execute a script in the page

Script = "StartScript(null);"
Me.WebBrowser0.Object.Document.parentWindow.execScript Script, "JavaScript"

This worked just fine in Access 2007, but after installing 2010 I get the following pop-up error:

Run-Time error '-2147024891 (80070005)':
Access is Denied.

Any ideas?

© Stack Overflow or respective owner

Related posts about ms-access-2010

Related posts about vba