Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
How can I print a workbook from a macro without opening the workbook?
Regards, Brett |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
No.
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
Misread your question. I meant "You can't."
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... No. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
Thanks Jon. 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 "Jon Peltier" wrote: No. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
Application.ScreenUpdating = False
Workbooks("abc.xls").Open ActiveSheet.PrintOut Application.ScreenUpdating = True - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... Thanks Jon. 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 "Jon Peltier" wrote: No. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
Thanks Jon, actually using a version of that. There are a number of
books/sheets that get printed, and I have a sheet that keep a visual track of the printing routine so that the user can see where it's up to. By not updating the screen they can't see the boxes change colour etc. I guess I can play around with turning the updating on and off at various times. I have another question for you. In my VB editor, for the last 36 hours, whenever I do a find and/or replace the dialogue box snaps over to the left. This is very aggravating, and it only started doing it without me doing or changing anything that I'm aware of. As usual I can't find anything in VB Help (only useful for solutions to complex problems). I imagine that I'm not alone in my opinion of VB help (the help in excel is very good, by contrast). Thanks & regards, Brett "Jon Peltier" wrote: Application.ScreenUpdating = False Workbooks("abc.xls").Open ActiveSheet.PrintOut Application.ScreenUpdating = True - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... Thanks Jon. 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 "Jon Peltier" wrote: No. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
In my VB Editor, the Find/Replace dialog likes to pop up straddling my two
screens (the VBE is maximized on the left screen, Excel maximized on the right). This is an enormous pain. But I generally use the Find functionality in MZTools instead. MZTools is a free VBE add-in that has lots of useful features. Use Google to find it. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... Thanks Jon, actually using a version of that. There are a number of books/sheets that get printed, and I have a sheet that keep a visual track of the printing routine so that the user can see where it's up to. By not updating the screen they can't see the boxes change colour etc. I guess I can play around with turning the updating on and off at various times. I have another question for you. In my VB editor, for the last 36 hours, whenever I do a find and/or replace the dialogue box snaps over to the left. This is very aggravating, and it only started doing it without me doing or changing anything that I'm aware of. As usual I can't find anything in VB Help (only useful for solutions to complex problems). I imagine that I'm not alone in my opinion of VB help (the help in excel is very good, by contrast). Thanks & regards, Brett "Jon Peltier" wrote: Application.ScreenUpdating = False Workbooks("abc.xls").Open ActiveSheet.PrintOut Application.ScreenUpdating = True - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... Thanks Jon. 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 "Jon Peltier" wrote: No. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
#10
Posted to microsoft.public.excel.misc
|
|||
|
|||
Print workbook without opening it
Great, thanks Jon
"Jon Peltier" wrote: In my VB Editor, the Find/Replace dialog likes to pop up straddling my two screens (the VBE is maximized on the left screen, Excel maximized on the right). This is an enormous pain. But I generally use the Find functionality in MZTools instead. MZTools is a free VBE add-in that has lots of useful features. Use Google to find it. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... Thanks Jon, actually using a version of that. There are a number of books/sheets that get printed, and I have a sheet that keep a visual track of the printing routine so that the user can see where it's up to. By not updating the screen they can't see the boxes change colour etc. I guess I can play around with turning the updating on and off at various times. I have another question for you. In my VB editor, for the last 36 hours, whenever I do a find and/or replace the dialogue box snaps over to the left. This is very aggravating, and it only started doing it without me doing or changing anything that I'm aware of. As usual I can't find anything in VB Help (only useful for solutions to complex problems). I imagine that I'm not alone in my opinion of VB help (the help in excel is very good, by contrast). Thanks & regards, Brett "Jon Peltier" wrote: Application.ScreenUpdating = False Workbooks("abc.xls").Open ActiveSheet.PrintOut Application.ScreenUpdating = True - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... Thanks Jon. 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 "Jon Peltier" wrote: No. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Brettjg" wrote in message ... How can I print a workbook from a macro without opening the workbook? Regards, Brett |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening workbook | Excel Discussion (Misc queries) | |||
How do I print a workbook in but only print selected worksheets? | Excel Discussion (Misc queries) | |||
Macro to open print window and set to print entire workbook | Excel Discussion (Misc queries) | |||
How to print worksheets of the same name in different workbooks without opening | Excel Discussion (Misc queries) | |||
How do you print all worksheets in a file without opening the fil. | Excel Worksheet Functions |