I'm writing a C++ code with WINAPI()
and I need to print many excel documents by using the ShellExecute()
function as shown below:
ShellExecute(NULL,"print","c:\\printdocs\\test1.xls",NULL,NULL,SW_SHOWNORMAL);
The above command works fine and prints the Excel document, but the particular excel document is getting opened and an alert message is getting displayed saying 'Do you want to save the changes you made to test1.xls' for every excel document.
Here I don't want the excel sheet to be opened and I need to bypass the alert display so that the all excel documents are printed silently in the background. Please tell me how to print the excel documents silently in the background using shellExecute()
.