>Hi:
>
>Using Word as an automation server, is there a way to make the communication between VFP client and Word server synchronous? IOW, have Word wait for each line of code to finish before moving on to the next?
>
>The problem is when I send something to print. While it is printing the code keeps running and skips over Quit command. I want to print then Quit Word. Right now it tries to quit while still printing.
>
>Thanx,
>Charlie
Charlie,
Then print in background is true. You can still wait for it to finish :
declare Sleep in Win32API integer
do while oWord.BackgroundPrintingStatus > 0 &&Printing not finished
Sleep(3000) && Sleep for 3 secs
enddo
Or you could set backgroudn printing off :
oWord.Options.PrintBackGround = .F.
Cetin