473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Open and close a word file

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

Nov 22 '05 #1
4 1407
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.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Ruslan" <ru*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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

Nov 22 '05 #2
If you want something simple just right click the task bar then choose Task
Manager select Processes tag.

chanmm
"Ruslan" <ru*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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

Nov 22 '05 #3
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: de*****@inbox.r.u

Nov 22 '05 #4
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
"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"Ruslan" <ru*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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


Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin Lucas-Smith | last post by:
I am trying to use PHP's COM support to open a URL from within MS Word then save the document. I am using PHP5.0.3/Apache2/WindowsXP. phpinfo() confirms that COM support is enabled. ...
1
by: Andrew | last post by:
I'm adding this as it to me a while to figure out all the pieces to be able to do this without using Microsoft.Office.Interop which caused me problems on the web-server. Streaming is the easy...
10
by: Antoine De Groote | last post by:
Hi there, I have a word document containing pictures and text. This documents holds several 'ABCDEF' strings which serve as a placeholder for names. Now I want to replace these occurences with...
7
by: Peter | last post by:
I have the following code which is executed from a modal web page - it works fine on most, but on some computers the Word loads into memory but never displays. This occurs with IE6 and IE7, but...
0
by: Ang | last post by:
Hi, I want to open a word file on background instead of showing the process on client's screen. And then do mailmerge, after that allow user to saveas. (user simply click the button and IE will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.