From Excel VSTO vb.net code I want to show the print preview screen and go on and print from there and choose a printer from the print dialog. However each printer is listed twice/double in the printer dialog when it is called from the print preview screen. I tried both ways I know to launch the print preview screen from vb.net code:
- Interop.Excel.Sheets.Preview()
- Globals.ThisAddIn.Application.Dialogs(Excel.XlBuiltInDialog.xlDialogPrintPreview).Show()
Both give the same result with double listed printers. However, when I call the print dialog directly, without preview, the printers are listed correctly, i.e. each printer only once. That is done with the following code:
Globals.ThisAddIn.Application.Dialogs(Excel.XlBuiltInDialog.xlDialogPrint).Show()
My question is, how can I get each printer only listed once (in stead of twice) from the print preview screen?
Help will be very much appreciated!
Regards HenkGijsbert