ActiveXObject error

K

King Coffee

Actually am using ie7 and MS Vista... but not newsgroup exist for it. Went
I try to execute the JScript below:

function openWord() {
alert("inside openWord");
var word = new ActiveXObject('Word.Application'); // get stuck here

if (word != null) {
alert("Caught");
word.Visible = true;
var doc = word.Documents.Add();
doc.Content = "Gaurang";
word.quit(0);
}
else {
alert("MS WORD IS NOT INSTALLED");
}
}

I get JScript runtime error: Automation server can't create object.

How can I get around this error?

King
 
P

PA Bear [MS MVP]

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

HTML and DHTML Overviews and Tutorials
http://msdn.microsoft.com/en-us/library/ms537623.aspx and

Cascading Style Sheets (CSS)
http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

Or you could post here instead:

MSDN IE Development Forums
http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=253&SiteID=1

=> Those with IE7-specific questions or comments are asked to post to and
seek support in this newsgroup: microsoft.public.internetexplorer.general

On the web:
http://www.microsoft.com/communitie...?dg=microsoft.public.internetexplorer.general

In your newsreader:
news://msnews.microsoft.com/microsoft.public.internetexplorer.general
 

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

Similar Threads


Top