Showing the word document from VB

G

Guy Cohen

Hi all,
I use VB6 to generate a Word document, using:

Dim WordApp As Word.Application
Dim WordDoc As Word.Document

Is it possible to show the document it AS MODAL (like form.show vbmodal) and
when the user will save/close it- the VB program will continue with its
work?

TIA
Guy
 
M

Malcolm Smith

Yes.

There is some code somewhere which waits for another application to stop
running. You will have to hunt on Google for something like "VB Wait for
another application to terminate" or something.

Right. Get that code and then put that into a userform. Make that form
modal. Then each n-seconds or so check to see if the Word application has
ended.

If it has ended then get the userform to unload itself.

- Malc
www.dragondrop.com
 
J

Jezebel

No. Malcolm's right that you can make your VB program wait for Word to
finish before proceeding, but that is not the same as showing the document
modally. When a modal form is displayed the user MUST deal with the modal
form before they can do anything else; you can't force Word to behave this
way.
 
Top