Friday 18 May 2012

Printer Setup Pop-up When Opening Excel File



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
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.



4 comments:

  1. I know this is 8 years old, but it still helped me today!

    ReplyDelete
  2. We also just used this and it helped us out big time!!

    ReplyDelete
  3. This just helped me in 2022. Thank you

    ReplyDelete