I am trying to use the following to consistently print an Excel sheet on a legal page, on a color printer, IN color.
If I work on something else (a Word doc) and print it to a different printer and print the doc in b&w, when I return to the spreadsheet and run this macro, the sheet prints in black and white.
IT has my default setting for the color printer set at B&W. Several different people will use this spreadsheet. I need everyone to be able to print it in color. Ideas?
Thanks.
==================================
Sub mcrPRINT_and_SAVE()
'
' mcrPRINT_and_SAVE Macro
'
'
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Range("AB4").Value
Application.DisplayAlerts = True
'
ActiveSheet.Unprotect
ActiveWindow.LargeScroll ToRight:=-1
Selection.AutoFilter Field:=1, Criteria1:="Display"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$8"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$B$2:$Q$504"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "&""Arial,Bold""&8&Z&F&A"
.LeftMargin = Application.InchesToPoints(0.33)
.RightMargin = Application.InchesToPoints(0.51)
.TopMargin = Application.InchesToPoints(0.26)
.BottomMargin = Application.InchesToPoints(0.36)
.HeaderMargin = Application.InchesToPoints(0.2)
.FooterMargin = Application.InchesToPoints(0.21)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 5
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter Field:=1
Application.Goto Reference:="AnchorCell"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
swtrader
-- If you don't know where you're going, you'll always know when you're not there.
If I work on something else (a Word doc) and print it to a different printer and print the doc in b&w, when I return to the spreadsheet and run this macro, the sheet prints in black and white.
IT has my default setting for the color printer set at B&W. Several different people will use this spreadsheet. I need everyone to be able to print it in color. Ideas?
Thanks.
==================================
Sub mcrPRINT_and_SAVE()
'
' mcrPRINT_and_SAVE Macro
'
'
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Range("AB4").Value
Application.DisplayAlerts = True
'
ActiveSheet.Unprotect
ActiveWindow.LargeScroll ToRight:=-1
Selection.AutoFilter Field:=1, Criteria1:="Display"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$8"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$B$2:$Q$504"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "&""Arial,Bold""&8&Z&F&A"
.LeftMargin = Application.InchesToPoints(0.33)
.RightMargin = Application.InchesToPoints(0.51)
.TopMargin = Application.InchesToPoints(0.26)
.BottomMargin = Application.InchesToPoints(0.36)
.HeaderMargin = Application.InchesToPoints(0.2)
.FooterMargin = Application.InchesToPoints(0.21)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 5
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter Field:=1
Application.Goto Reference:="AnchorCell"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
swtrader
-- If you don't know where you're going, you'll always know when you're not there.