View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Brettjg Brettjg is offline
external usenet poster
 
Posts: 295
Default Print workbook without opening it

Thanks Jerry. I thought you might say that. Have already got the code in
place, but was trying to avoid a lot of dancing on the screen. Regards, Brett

"JLatham" wrote:

Can't be done.

I think the closest you could get would be to initially use Print to File
option in Excel's File | Print dialog and then use VB to print that file (an
interesting exercise in itself these days) but the output file would be
printer dependent because the control codes for the printer are embedded
within the output file, I believe. That would mean if you used the drivers
for the printer on your computer, someone else with a different printer would
not get same output results. If you had a non-specific printer type defined,
such as a virtual .pdf device, then you could print to that device, it would
end up in .pdf format and you may be able to direct that to any printer.
I've never attempted any of that, so haven't a clue as to whether it would
actually work or not.

Best thing to do is simply set your macro up to open the workbook - and
print it from the macro.

"Brettjg" wrote:

How can I print a workbook from a macro without opening the workbook?
Regards, Brett