Word Automation / Windows 2000 SP4

  • Thread starter Justin Hinerman
  • Start date
J

Justin Hinerman

I have a program that uses word automation to open word,
open a document, print a selected document, and closes
word. Before I installed SP4 for Windows 2000, the
following code worked flawlessly:

Dim objWord
Set objWord = CreateObject("Word.Application")

objWord.Documents.Open strFileName, false, true, false
objWord.Application.DisplayAlerts = 0
objWord.Application.ActivePrinter = "HP_printer"
objWord.Application.PrintOut true,,0,,,,,1

objWord.ActiveDocument.Close false

objWord.Quit
Set objWord = Nothing

In DCOMCNFG, I have Word set to run under the identity of
Administrator, in order to have access to all network
resources.
This was on Windows 2000 SP3.

Since I installed SP4 for Windows 2000, this Word
automation does not work. Whenever I call the line in the
above code 'objWord.documents.open ... " the program
freezes and the word process hangs. The same happens if I
try to run this code in a macro in Word VBA. Whenever it
gets to the line that opens a file, and the file is on a
shared network resource, it hangs. Again, this worked
prior to SP4. Is there a new security setting in SP4?

I have tried uninstalling Office, restarting, and
reinstalling Office, but that did not work.

Any help would be GREATLY appreciated. Thanks!
 
W

Word Heretic

G'day "Justin Hinerman" <[email protected]>,

sorta sounds like a security setting.


Justin Hinerman said:
I have a program that uses word automation to open word,
open a document, print a selected document, and closes
word. Before I installed SP4 for Windows 2000, the
following code worked flawlessly:

Dim objWord
Set objWord = CreateObject("Word.Application")

objWord.Documents.Open strFileName, false, true, false
objWord.Application.DisplayAlerts = 0
objWord.Application.ActivePrinter = "HP_printer"
objWord.Application.PrintOut true,,0,,,,,1

objWord.ActiveDocument.Close false

objWord.Quit
Set objWord = Nothing

In DCOMCNFG, I have Word set to run under the identity of
Administrator, in order to have access to all network
resources.
This was on Windows 2000 SP3.

Since I installed SP4 for Windows 2000, this Word
automation does not work. Whenever I call the line in the
above code 'objWord.documents.open ... " the program
freezes and the word process hangs. The same happens if I
try to run this code in a macro in Word VBA. Whenever it
gets to the line that opens a file, and the file is on a
shared network resource, it hangs. Again, this worked
prior to SP4. Is there a new security setting in SP4?

I have tried uninstalling Office, restarting, and
reinstalling Office, but that did not work.

Any help would be GREATLY appreciated. Thanks!

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email: (e-mail address removed)
Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 728 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.
 

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