P
Phil Galey
I created a service application in VB.NET on Windows 2000 Pro, but right now it's just running on the development workstation.
I'm starting out by checking to see whether Word is already running by using
Dim pcs as Process
Dim psiWord as Process.ProcessStartInfo(<path to WINWORD.EXE>)
Dim wd as Word.Document
Dim wa as Word.Application
For each pcs in Process.GetProcessesByName("WINWORD")
pcs.CloseMainWindow
Next pcs
pcs = Process.Start(psiWord)
Threading.Thread.Sleep(3000)
wd = New Word.Document() <==== ...application is busy. error
wa = wd.Application
But I'm getting the error: "The message filter indicated that the application is busy." when instantiating a new word document. I also notice that if I close the application and then try to kill the Word process through the task manager, it says "Access is denied." Is it possible to automate word from within a service application? Thanks.
I'm starting out by checking to see whether Word is already running by using
Dim pcs as Process
Dim psiWord as Process.ProcessStartInfo(<path to WINWORD.EXE>)
Dim wd as Word.Document
Dim wa as Word.Application
For each pcs in Process.GetProcessesByName("WINWORD")
pcs.CloseMainWindow
Next pcs
pcs = Process.Start(psiWord)
Threading.Thread.Sleep(3000)
wd = New Word.Document() <==== ...application is busy. error
wa = wd.Application
But I'm getting the error: "The message filter indicated that the application is busy." when instantiating a new word document. I also notice that if I close the application and then try to kill the Word process through the task manager, it says "Access is denied." Is it possible to automate word from within a service application? Thanks.