Word does not open when run from Scheduler

B

Brian Gabriel

I have a VBScript that tries to open a word document and run a macro.
The script works fine when run interactively, however when the script
is run as a scheduled task the script exits when I try:

Set objWord = CreateObject("Word.Application")

Any info would be great!

Thanks,

Brian
(e-mail address removed)
 
P

Peter Hewett

Hi Brian Gabriel

Try logging into the account the script is using. Then start Word. For Word to
work properly when invoked as a COM object it must have been manually started at
least one in that particular account. It seems that the very first time Word is
started it initialises itself.

I built an application for a client that runs Word from a System Service, and
it took me forever to work out why it worked in the IDE but not when run from
the service component!!!

HTH + Cheers - Peter


(e-mail address removed) (Brian Gabriel), said:
 
B

Brian Gabriel

It turns out that the issue was with DCOM permissions... I added the
launching user to be able to launch the component and bam!

I found the solution in Microsoft Article Q257757.

Thanks,

Brian
 

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