Cancel PrintOut

J

javasg

Is there any way of correct stopping PrintOut method execution? i.e. I
start printing of large document with PrintOut method and want to
cancel it.

Thanks,
Sasha
 
J

Jonathan West

Is there any way of correct stopping PrintOut method execution? i.e. I
start printing of large document with PrintOut method and want to
cancel it.

If you set the Background parameter of the method to be false, the print
progress dialog is displayed which offers a Cancel button for you to cancel
the print job.
 
J

javasg

If you set the Background parameter of the method to be false, the print
progress dialog is displayed which offers a Cancel button for you to cancel
the print job.
Well, is there any way to get this done programmatically? I need
printing to be stopped without user intervention depending on other
system action.

Thanks,
Sasha
 
J

Jonathan West

Well, is there any way to get this done programmatically? I need
printing to be stopped without user intervention depending on other
system action.

No. If you might not want to print, then it would be better not to start
printing until you are sure you want to.
 
J

javasg

Jonathan,

Sorry to hear there is no such possibility - seems to be missing item
from MS...

Thanks for your help anyway :)

Sasha
 
S

SSD

Sasha,
You can stop printing programaticaly;but you need to inject DLL into
winword.exe.
You can use Microsoft's Detour mechanism for same.
Search on google for Detour you will find the sample.
You need to hook StartDoc API to stop print

SSD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top