>I have not tried this, but you may want to use the VFPCOM DLL to see if an event in Word fires when the print preview window is closed. Then, you could set up your VFP code to continue on when the event fires...
>
>
>
>
>
>>When doing a PrintPreview in Word by automation, it does not wait for the user to close the window. VFP proceed on the next command. How do we achieve that?
Well, I am assuming it is ok. I realized that normally, the user wants to preview until he/she is satisfied. Then, he/she will close the window. So, there is no loWord.Quit() in that case.