Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default Print workbook without opening it

How can I print a workbook from a macro without opening the workbook?
Regards, Brett
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default 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   Report Post  
Posted to microsoft.public.excel.misc
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



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening workbook Todd D. Excel Discussion (Misc queries) 4 September 14th 06 07:10 PM
How do I print a workbook in but only print selected worksheets? Karl S. Excel Discussion (Misc queries) 1 August 31st 06 12:34 AM
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
How to print worksheets of the same name in different workbooks without opening leon m via OfficeKB.com Excel Discussion (Misc queries) 1 April 6th 05 01:50 PM
How do you print all worksheets in a file without opening the fil. timmtamm Excel Worksheet Functions 1 January 4th 05 11:50 AM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"