print word document from olecontainer
Posted on 1997-08-17
I need to print a winword document which is loaded in an olecontainer component (iconic := false). The command Print isn't supported whern iconic = false, so before printing i change iconic to True. then i send the command PRINT to the oleobject, and printing starts. The problem is that I need to go back right after the command PRINT is completted so i do OleContainer1.close which disactivate the WinWord server, but the print job is being spooling at that time and closing the server stack the printing in spooling condition. what can i do to prevent that ? remember that i must use the close method because i want to change iconic back to False.