in reply to Re: Selecting printer in Excel
in thread Selecting printer in Excel
Typical output from an MSDOS screen isuse strict ; use OLE; use Win32::OLE::Const "Microsoft Excel"; my ($excel, $workbook, $sheet, $file_name, $pobj); $file_name = "C:\\Bookxxx.xls"; $excel = CreateObject OLE "Excel.Application"; $workbook = $excel -> Workbooks -> Open($file_name); $pobj = $excel->ActivePrinter; if ($pobj) { print "start - Name of default printer => $pobj \n"; } $excel->{ActivePrinter} = "Auto HP Deskjet 6500 Series on HOMEDELLTOWE +R on Ne02:"; $pobj = $excel->ActivePrinter; if ($pobj) { print "after setting - Name of default printer => $pobj \n"; } $workbook->PrintOut();
|
|---|