xzlaatc
New Member
- Joined
- Jun 15, 2009
- Messages
- 15
My organization just moved from Office 2003 to 2010. The first problem I have encountered is that a code to setup the page and open the print preview has stopped working. Now, it just opens the preview, but ALL functions in the preview are disabled, making it impossible to complete the print job.
Any help would be greatly appreciated!
Here is a sample:
Private Sub PrintCSReportButton1_Click()
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
'.PrintQuality = Array(300, 300)
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Draft = False
'.PaperSize = xlLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=1, Copies:=1, Preview:=True, Collate:=True
End Sub
Any help would be greatly appreciated!
Here is a sample:
Private Sub PrintCSReportButton1_Click()
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
'.PrintQuality = Array(300, 300)
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Draft = False
'.PaperSize = xlLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=1, Copies:=1, Preview:=True, Collate:=True
End Sub
Last edited: