Print multiple documents in a folder

218 views Asked by At

I just need to print multiple documents inside a folder using C++ code. I am using IOleCommandTarget.Exec() method.

For the first time I have to show the print configuration dialog( I have set "OLECMDEXECOPT_PROMPTUSER" to show the print config dialog for the first print) and get the user inputs like paper orientation, number of copies etc. Same setting I have to use for subsequent documents.

Can anybody say how to get user inputs that set for first print? Also I have seen the next print is not waiting for 'user input' in print dialog(which is showing for first doc print). How to make it synchronous?

Here is my code:

 CComQIPtr<IOleCommandTarget> spCommandTarget(DocumentObj); 
 spCommandTarget->Exec(&CGID_MSHTML, IDM_PRINT, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
0

There are 0 answers