IE error: Automation server can't create object

T

Tim

The following javascript has been working just fine for the last 5 months.
Now, for no apparent reason, the following error occurs when the script is
run.

"Automation server can't create object"


The script is below. Please note that the parameter passed to the function
is a valid path/filename.

I tried setting all browser security settings to "low", but this did not
resolve the problem.

Any suggestions are greatly appreciated.

-----------------------------------

<script language="JavaScript">
function startWord(strFile)
{
var myApp = new ActiveXObject("Word.Application");
if (myApp != null)
{
myApp.Visible = true;
myApp.Documents.Open(strFile);
}
}
</script>
 
I

Ivo

"Automation server can't create object"

I tried setting all browser security settings to "low", but this did not
resolve the problem.

Yes, those levels are confusing. Undo what you just did, first of all. Then
you need to tweak the properties of the level that the site is in. Tools ?
Internet Options… ? choose tab Security ? click button Custom level ? scroll
to 'Run ActiveX controls and plug-ins' ? select ‘prompt’ or ‘enable’.
Presumably something 's changed there, probably we 'll never know how.
 
I

Ivo

you need to tweak the properties of the level that the site is in. Tools ?
Internet Options… ? choose tab Security ? click button Custom level ? scroll
to 'Run ActiveX controls and plug-ins' ? select ‘prompt’ or ‘enable’.

Those question marks were right-pointing arrows --> earlier on.
ivo
 
T

Tim

Ivo said:
Those question marks were right-pointing arrows --> earlier on.
ivo

That particular setting didn't fixed the problem. However, I decided to try
some of the others in that section. Turns out the problem has been resolved
by enabling the following setting "Initialize and script ActiveX control not
marked as safe."

thanks Ivo!
 
D

Danny

May just be you updated/removed something, maybe added Sp2 or
something got updated or changed somehow, Word.Application argument
I'd think uses DDE accessing to an understood to be installed and
registered(registry wise) Microsoft Word component, which usually
since office97 doesn't install by itself but is part of MS office
suite. So, the call is fine as is, the component however, is not
found by ActiveXObject() constructor, so, doesn't seem to me to be a
js issue, more than a system component one. You could put your code
in a try {...} catch() {...} statements and do some Exceptioin
capturing.


Danny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top