Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kim
 
Posts: n/a
Default Controlling Print Defaults - Printing From Windows Explorer

I have several Excel workbooks that need to be printed (in order). I am
trying to print them from Windows Explorer by selecting all of my files and
printing from File + Print -- but -- because the default is to print only the
current sheet, the entire workbook will not print. Any suggestions? Thank
you.
  #2   Report Post  
Barb R.
 
Posts: n/a
Default

When I select File - Print ... I have an option to print the Entire
Workbook. I'm using Excel 2002.

"Kim" wrote:

I have several Excel workbooks that need to be printed (in order). I am
trying to print them from Windows Explorer by selecting all of my files and
printing from File + Print -- but -- because the default is to print only the
current sheet, the entire workbook will not print. Any suggestions? Thank
you.

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about a workbook that opens each workbook, then prints each entire workbook,
closes it and repeats.


Option Explicit
Sub auto_open()

Dim myFileNames As Variant
Dim wkbk As Workbook
Dim iCtr As Long
Dim testStr As String

myFileNames = Array("C:\my documents\excel\book1.xls", _
"c:\my documents\excel\test\book2.xls")

For iCtr = LBound(myFileNames) To UBound(myFileNames)
testStr = ""
On Error Resume Next
testStr = Dir(myFileNames(iCtr))
On Error GoTo 0

If testStr = "" Then
MsgBox myFileNames(iCtr) & " wasn't found!"
Else
Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr))
wkbk.PrintOut preview:=True
wkbk.Close savechanges:=False
End If
Next iCtr

'thisworkbook.Close savechanges:=false

End Sub

I used preview:=true to save some trees.

And when you're done testing, remove the comment from that last .close line.
Save the workbook with the code first--else you'll be recreating it.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Kim wrote:

I have several Excel workbooks that need to be printed (in order). I am
trying to print them from Windows Explorer by selecting all of my files and
printing from File + Print -- but -- because the default is to print only the
current sheet, the entire workbook will not print. Any suggestions? Thank
you.


--

Dave Peterson
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
Excel printing problem - won't print cell under a "fill effect" bo dmotika Excel Discussion (Misc queries) 0 May 26th 05 04:38 PM
how do I print a range without printing the blank pages? Chris VP Excel Discussion (Misc queries) 2 May 2nd 05 07:08 PM
Having trouble printing selected sheets in Excel lost in the world Excel Discussion (Misc queries) 1 April 26th 05 06:24 PM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM


All times are GMT +1. The time now is 05:00 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"