Click to See Complete Forum and Search --> : Using Automation server on IE (5, 5.5 & 6)
kopite
04-24-2003, 09:00 AM
Hi,
I am using IE - and am creating an ActiveXObject
e.g.
= new ActiveXObject("Word.Document");
but on IE5.5 and IE5, I get an error of "Automation server can't create object" - works okay with IE6.
Is there anyway that I can get around this for it work on IE5 or/and IE5.5?
Cheers!
Try putting it on your local computer instead of on the Internet. Most of the time, for some strange reason, the server doesn't send AcitveX the way it should.... Whatever you do, don't try uploading to Geocities! :p
kopite
04-24-2003, 09:53 AM
Sorry don't follow...
My JScript is ->
function myFunc()
{
var Word = new ActiveXObject("Word.Document");
Word.Application.Visible=true;
myActiveX.application.selection.typeText("Help!");
}
Yah, put that code in the <script> tags, and in an HTML document. Then save it on to YOUR computer as a .html file. Then open it. If you get the same error... I'm not sure what to tell you. Because I've never been able to get my server to run ActiveX (I think it's a security thing) without causing that exact error. That's all I can suggest--sorry.
kopite
04-24-2003, 10:05 AM
This is all client side in a js file, so it is basically run on MY computer..
<script="javascript">
function myFunc()
{
var Word = new ActiveXObject("Word.Document");
Word.Application.Visible=true;
myActiveX.application.selection.typeText("Help!");
}
</script>
mjbarfoot
04-24-2003, 10:16 AM
This sounds like a dll problem. I had this, but a different message" The service provider does not support..." when using vbscript to create a MS outlook active x object".
My tip would be make sure word is service packed and if necessary try and re-install the necessary com dlls - should be able to do this in the advanced part of the installer.
IE6 maybe be handling the com calls slightly differently hence the difference between v5.5 and 6.
kopite
04-25-2003, 03:07 AM
Trouble with that is that we're talking hundreds of users, so bit of a problem for those on less that ie v6.
DrDaMour
04-25-2003, 03:13 AM
and ActiveX isn't a really recognized standard yet,
but think of it this way, if they HAVE ms word, then they probably have IE6.
kopite
04-25-2003, 03:27 AM
True, they probably have IE6, but.... some ppl don't have IE6, and that is ze problem.
I guess I will just have to disable the feature for those with less than IE6.
mjbarfoot
04-25-2003, 03:41 AM
I had a quick look around...
Have a look here:
http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/30/pid/194/qid/481466
Looks like someone had a similar problem and solved it by using the getobject method rather than create. They did this by opening a dummy document then once the object was created closing it and then doing what they wanted...
The context is different, but an alternative approach may be worth a try...