Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default PrintQuality setting - is -3 a valid setting?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default PrintQuality setting - is -3 a valid setting?

Thanks - I believe it corresponds with the Medium setting. I think -1 is
Draft, thru to -4 for High.Looks like 2002 works the same way; just checked
it out on another machine.

'Excel VBA for Applications - 2nd Ed' from '96 by Jeff Webb discusses it.
Says -1 thru -4 are the valid settings. J. Walk's "Excel Power Programming
w/VBA" and "Excel 2003 VBA - programmer reference" (Kimmel, et al) don't
seem to discuss it much - or I haven't found it yet.

Found one Google result in Dutch or German where, I think, a related
question is being posed. Not sure - I took Spanish.


Hallo!
Bitte , wer kann mir mal näheres - zu oben - mitteilen.

ActiveSheet.pageSetup.Print Quality = -3


Was gibt -3 an ?
b.z.w. wo gibt es dazu Reverenzen ?


Danke schonmal
Jürgen


Reply



Grüezi Jürgen

Jürgen Stadermann schrieb:



ActiveSheet.pageSetup.Print Quality = -3


Was gibt -3 an ?
b.z.w. wo gibt es dazu Reverenzen ?




Stelle im VBA-Editor den Schreibcursor in das Wort 'PrintQuality' und
drücke F1. Bei korrekt installierte Online-Hilfe wirst Du direkt zum
Thema
'katapultiert'. ;-)

--
Mit freundlichen Grüssen


Thomas Ramel
- MVP für Microsoft-Excel -





"NickHK" wrote in message
...
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









  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default PrintQuality setting - is -3 a valid setting?

Bill,
Excel XP & Excel 2000 seem to behave the same; it's the printer driver that
determines permitted values. Whilst it appears all drivers should support
the Index values, some don't.

Adobe PDF: PrintQuality takes a dpi value and errors with -1,-2 etc values.
HP Deskjet: PrintQuality takes -1,-2, etc value and errors with dpi values
MS Fax: PrintQuality = Array(200, 100) or dpi value and errors with -1,-2
etc values.

These values match those that appear in the "Print Quality" combo on the
Page setup dialog, not surprisingly.

Getting these values would probably require the GetPrinter, GetDeviceCaps
etc APIs as they are not exposed by Excel (or VB's Printer object).
A simpler approach would be to try a dpi value; if it error, try a -1 value.

NickHK

"Bill G" wrote in message
. ..
Thanks - I believe it corresponds with the Medium setting. I think -1 is
Draft, thru to -4 for High.Looks like 2002 works the same way; just

checked
it out on another machine.

'Excel VBA for Applications - 2nd Ed' from '96 by Jeff Webb discusses it.
Says -1 thru -4 are the valid settings. J. Walk's "Excel Power Programming
w/VBA" and "Excel 2003 VBA - programmer reference" (Kimmel, et al) don't
seem to discuss it much - or I haven't found it yet.

Found one Google result in Dutch or German where, I think, a related
question is being posed. Not sure - I took Spanish.


Hallo!
Bitte , wer kann mir mal näheres - zu oben - mitteilen.

ActiveSheet.pageSetup.Print Quality = -3


Was gibt -3 an ?
b.z.w. wo gibt es dazu Reverenzen ?


Danke schonmal
Jürgen


Reply



Grüezi Jürgen

Jürgen Stadermann schrieb:



ActiveSheet.pageSetup.Print Quality = -3


Was gibt -3 an ?
b.z.w. wo gibt es dazu Reverenzen ?




Stelle im VBA-Editor den Schreibcursor in das Wort 'PrintQuality'

und
drücke F1. Bei korrekt installierte Online-Hilfe wirst Du direkt zum
Thema
'katapultiert'. ;-)

--
Mit freundlichen Grüssen


Thomas Ramel
- MVP für Microsoft-Excel -





"NickHK" wrote in message
...
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








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
setting default filter setting tpeter Charts and Charting in Excel 0 December 4th 09 02:50 PM
PrintQuality Rob A. Excel Programming 1 April 4th 05 06:53 PM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
VBA Setting .Value to a date does not respect local system setting Frank_Hamersley Excel Programming 13 July 18th 04 02:51 PM
Sending email via macro- setting the importance setting. Julian Milano[_2_] Excel Programming 1 January 20th 04 10:15 PM


All times are GMT +1. The time now is 11:51 PM.

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"