View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK[_3_] NickHK[_3_] is offline
external usenet poster
 
Posts: 415
Default PrintQuality setting - is -3 a valid setting?

Bill,
For what's it's worth, the Object Browser, shows this for PrintQuality
Property PrintQuality([Index])
Excel.PageSetup

rather than
Property TopMargin As Double

I don't have Help or a printer installed here, so I can't check further.
What is -3 supposed to signify ?

NickHK

"Bill G" ¼¶¼g©ó¶l¥ó·s»D:6bKdncif0seoSb7YnZ2dnUVZ_rednZ2d@co mcast.com...
What's the trick to avoid a run time error the PrintQuality setting in
Page Setup? Do I delete that line to let it default on the end users
machine?

I'm appending recorded code from both Excel 2003 SP2 and 2000, for what
it's worth. My main concern is 2003, but it'd be nice to know whatever
other hiccups might await me out there.

In 2000 the setting was in terms of dpi; in 2003 it's an index.I don't
know if that's material to the issue, though - a co-worker got the run
time error even though she's running the same version of Excel that I used
to record the macro (2003). The sub bombed on the PrintQuality line


The recorded code from 2003:

Sub PrintQuality2003Code()
'
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub


The recorded code from 2000:

Sub PrintQuality2000Code()
'
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
End Sub