LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel select printer

I am using the Excel_ChartPrintOut() function to print a chart. According to the FP and the help file there is a parameter called Active Printer, which can be used to set the active printer. I assumed that I could pass a printer name to that parameter and it would print to that printer. However, it appears to be ignoring the value passed and always just printing to the default windows printer. Has anyone had any luck using this parameter? I am trying to give the user an option to print to a networked color printer if they do not want to print to the local printer. Thoughts?

Thanks!

Brian
0 Kudos
Message 1 of 2
(2,853 Views)
The ActivePrinter property works fine, you are probably just sending in the wrong name. It requires the network name of the printer (something like "\\\\server\\printer1 on Ne00:"). The best thing to do to make sure you have the name correct is to set the printer as the default in the system, then call Excel_GetProperty on the ActivePrinter property and see what comes out in the string that is returned. Then you know exactly what the function is expecting for the Excel_SetProperty call.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(2,853 Views)