0

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);
Keloth
  • 1
  • Maybe if you add a bit of code and show us where you have the problem on your code someone will help you. – Theocharis K. Jan 15 '13 at 05:23
  • I am adding code snippet here. ` CComQIPtr spCommandTarget(DocumentObj); spCommandTarget->Exec(&CGID_MSHTML, IDM_PRINT, OLECMDEXECOPT_DODEFAULT, NULL, NULL);` – Keloth Jan 15 '13 at 06:57

0 Answers0