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!

Re: Word Automation / Windows 2000 SP4 by Word

Word
Fri Jul 04 23:15:41 CDT 2003

G'day "Justin Hinerman" <jhinerma@mix.wvu.edu>,

sorta sounds like a security setting.


"Justin Hinerman" <jhinerma@mix.wvu.edu> was spinning this yarn:

>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: word_heretic@yahoo.com.au
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.