Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

VSTO Excel vb.net Print Preview: printers listed two times

$
0
0

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


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>