Can't create object 'Word.Application' error

J

James

Hi,

I have a web application that generates a word document
using VBScript. Most users have no problems but some
users get -

Error: ActiveX component can't create
object 'Word.Application'

on the line -

set oApp = createobject("Word.Application").

The users have their IE Security set to Low but still have
a problem.

All help greatly appreciated.

Cheers

James
 
C

Chad DeMeyer

James,

Have the users try the following in IE:

Tools>Internet Options>Security>Custom Level

Ensure that the following options are set:

Download signed ActiveX controls> Enable
Download unsigned ActiveX controls> Enable
Initialize and script ActiveX controls not marked as safe> Enable
Run ActiveX controls and plug-ins> Enable

This is what fixed it for us when we had the same problem some time back.

Regards,
Chad DeMeyer
 
M

Mark Bower [MSFT]

Just be aware James that this is a very, very dangerous thing to do.
Changing these settings in this way is effectively giving the web site full
control to download and run _ANY_ code it likes on your computer. All it
would take is for a user to browse to a malicious site and all their files
could be deleted.

A safe way to do the same thing would be to automate the XML DOM (MSXML is
safe for scripting) to generate WordML.

--
Mark Bower
Microsoft
http://blogs.msdn.com/bowerm

This post is provided 'as-is' without warranty and confers no rights.
 
C

Cindy M -WordMVP-

Hi James,

We were discussing this kind of problem (the "New" or
"CreateObject" keywords no longer working) and the general
consensus was that the culprit is most often Norton
AntiVirus. There's some kind of setting in the updates that
suppresses execution of script, and this is stopping ALL
outside automation that starts up an application using these
keywords. (GetObject continues to work, and Shell, too, I
think)
I have a web application that generates a word document
using VBScript. Most users have no problems but some
users get -

Error: ActiveX component can't create
object 'Word.Application'

on the line -

set oApp = createobject("Word.Application").

The users have their IE Security set to Low but still have
a problem.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
J

James

Mark,

Thanks for the information. Can you provide some links to
examples? And would this work in Word 2000 and 97?

The Knowledge base article 244264 refers to a similiar
problem in Visual Basic, do the troubleshooting methods
that it describes also apply to VBScript?

Many thanks
 
M

Mark Bower [MSFT]

No this is a new capability of Office 2003. If you are interested in
finding out more about WordML in general go look at
http://msdn.microsoft.com/office/understanding/xmloffice/default.aspx

Just had a quick look at the KB article you mention, and it looks as if all
the advice should apply to scripting languages too. Cindy's tip looks like
a good one to check out too though.

--
Mark Bower
Microsoft
http://blogs.msdn.com/bowerm

This post is provided 'as-is' without warranty and confers no rights.
 

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

Top