Hi,
I am using Excel 2007 but 2003 format under Win 7. I am printing landscape and want to fit a specific range on one page width. This macro is used by several different user and for one of them at least, it doesn't completely fit the range width and prints additional pages with rightmost character on a different pages.
Can someone identify why it is doing this for some environments. On mine it prints correctly everytime on 3 different printers.
Thank you
Pierre
Portion of the macro
Rows("12:12").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="<>"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$12"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$ay$312"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "Page &P"
.LeftMargin = Application.InchesToPoints(0.26)
.RightMargin = Application.InchesToPoints(0.26)
.TopMargin = Application.InchesToPoints(0.31)
.BottomMargin = Application.InchesToPoints(0.51)
.HeaderMargin = Application.InchesToPoints(0.31)
.FooterMargin = Application.InchesToPoints(0.49212)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 9
.PrintErrors = xlPrintErrorsDisplayed
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End With
Selection.AutoFilter Field:=1
Selection.AutoFilter
etc
etc
I am using Excel 2007 but 2003 format under Win 7. I am printing landscape and want to fit a specific range on one page width. This macro is used by several different user and for one of them at least, it doesn't completely fit the range width and prints additional pages with rightmost character on a different pages.
Can someone identify why it is doing this for some environments. On mine it prints correctly everytime on 3 different printers.
Thank you
Pierre
Portion of the macro
Rows("12:12").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="<>"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$12"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$ay$312"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "Page &P"
.LeftMargin = Application.InchesToPoints(0.26)
.RightMargin = Application.InchesToPoints(0.26)
.TopMargin = Application.InchesToPoints(0.31)
.BottomMargin = Application.InchesToPoints(0.51)
.HeaderMargin = Application.InchesToPoints(0.31)
.FooterMargin = Application.InchesToPoints(0.49212)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 9
.PrintErrors = xlPrintErrorsDisplayed
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End With
Selection.AutoFilter Field:=1
Selection.AutoFilter
etc
etc