Open and close a word file

  • Thread starter Thread starter Ruslan
  • Start date Start date
R

Ruslan

Hi,



I open a word file using ShellExecute. But I have to know when the open file
is closed. How could I know this? Is it possible or not?





Thanks in advance,

Ruslan
 
Using the Process and ProcessStartInfo classes in System.Diagnostics you can
retrieve the process id after you are done, and you can monitor that process to
see when it has closed using the same classes. Specifically there is an Exited
event that you can hook.
 
If you want something simple just right click the task bar then choose Task
Manager select Processes tag.

chanmm
 
Hello, Ruslan!
You wrote on Wed, 3 Nov 2004 09:10:32 +0200:

R> Hi,

R> I open a word file using ShellExecute. But I have to know when the open
R> file is closed. How could I know this? Is it possible or not?

U may use word (office) automation (COM) for it

R> Thanks in advance,

R> Ruslan


With best regards, äÍÉÔÒÉÊ. E-mail: (e-mail address removed)
 
Hi Justin,

This technique will notify you when the WINWORD process has terminated but
not when the file was closed.

I have had a similar problem and have yet not found a solution (don't want
to go the COM automation route).

Regards
Joubert
 
Back
Top