trisuglow
Feb 1st, 2002, 09:59 AM
I'm writing an application that opens up an instance of Word.
I can open Word. I can also check if a previous instance of Word is running. I can even send a message to the previous instance and make it close down.
My problem is this:
If there is an unsaved document in the previous instance of Word the user gets a prompt to save their work. I want to do the following;
1. Send Word a message to bring it to the front of the screen.
2. Wait until the user has saved their work.
After that I can carry on and close the instance.
I've want to make this work on Win95/98/2000 and NT with all versions of Word. I've found some promising looking bits of code on this site and in MSDN, but I can't seem to get them to work.
Tris.
I can open Word. I can also check if a previous instance of Word is running. I can even send a message to the previous instance and make it close down.
My problem is this:
If there is an unsaved document in the previous instance of Word the user gets a prompt to save their work. I want to do the following;
1. Send Word a message to bring it to the front of the screen.
2. Wait until the user has saved their work.
After that I can carry on and close the instance.
I've want to make this work on Win95/98/2000 and NT with all versions of Word. I've found some promising looking bits of code on this site and in MSDN, but I can't seem to get them to work.
Tris.