Open and close a word file

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
 
J

Justin Rogers

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.
 
C

chanmmn

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)
 
M

msnews.microsoft.com

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top