Forum Discussion
Loren_Chorley
May 19, 2020Copper Contributor
Change in behaviour of ShellExecuteEx "print" between Excel 2016 and 365
Hello!
I'm hoping someone can help me or at least confirm a change of behaviour so we can look for a new solution.
We use the WinAPI command ShellExecuteEx to print excel files (not specifically, we use it for other file types too) with the flag SEE_MASK_NOCLOSEPROCESS so that we can wait for Excel to finish and close before moving on to the next file.
This worked in Excel 2016, but now we have customers that have moved to Excel 365 and they're finding that Excel stays open, and our program stops until they manually close Excel.
I've tried other flags but Excel doesn't seem to signal that it's finished printing so there's no way to move on or to close it's instance. That is the command WaitForSingleObject always times out on the process handle.
Can someone confirm that the behaviour has changed and/or provide a workaround?
Thanking you in advance
Loren
No RepliesBe the first to reply