Overview
I had a problem when trying to open a specific excel file it would prompt the user with a Printer Setup window.
This was a problem because we were automating the excel workbook to refresh overnight and the prompt was stopping the automation from working.
This prompt also came up regardless of setting Application.DisplayAlerts = false in the controlling code behind
This prompt also came up regardless of setting Application.DisplayAlerts = false in the controlling code behind
Here is an example of what the prompt looks like:
Solution
The issue for me was that one of the sheets in my workbook had been saved with the workbook view "Page Break Preview". This seems to be saved on a per worksheet basis rather than per workbook. So make sure you change it to normal mode for all worksheets within the workbook.
Once i changed this back to Normal mode (as below) and then saved the workbook. I was no longer prompted with the Printer Setup screen.
I know this is 8 years old, but it still helped me today!
ReplyDeleteWe also just used this and it helped us out big time!!
ReplyDeletethanks. worked
ReplyDeleteThis just helped me in 2022. Thank you
ReplyDelete