dbTalk Databases Forums  

using the printer object, how do I tell what my default printer is

comp.databases.ms-access comp.databases.ms-access


Discuss using the printer object, how do I tell what my default printer is in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger
 
Posts: n/a

Default using the printer object, how do I tell what my default printer is - 11-09-2011 , 06:19 PM






I want to set the margins on a report to specific settings
so I'm thinking this will set the prt object to my default printer

Dim prt As Printer
Set prt = Application.Printers(0)

but it doesn't
and application.printers.count correct shows that I have eight
possible printers
so I could cycle through them if there was a prt property for 'default
printer' but I can't find one

is there a way to do this ?

Reply With Quote
  #2  
Old   
Roger
 
Posts: n/a

Default Re: using the printer object, how do I tell what my default printer is - 11-09-2011 , 06:27 PM






On Nov 9, 5:19*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
I want to set the margins on a report to specific settings
so I'm thinking this will set the prt object to my default printer

* * Dim prt As Printer
* * Set prt = Application.Printers(0)

but it doesn't
and application.printers.count correct shows that I have eight
possible printers
so I could cycle through them if there was a prt property for 'default
printer' *but I can't find one

is there a way to do this ?
looks like this will do it
application.Printer.DeviceName


and application.printer also has a rightMargin setting
so
?application.printer.RightMargin
360

how does 360 relate to a 1" margin

if I change the margin using
application.Printer.RightMargin = 200
will it apply to any reports that are printed or export to pdf
(access2010)

Reply With Quote
  #3  
Old   
Patrick Finucane
 
Posts: n/a

Default Re: using the printer object, how do I tell what my default printer is - 11-10-2011 , 09:59 AM



On Nov 9, 6:27*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 9, 5:19*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

I want to set the margins on a report to specific settings
so I'm thinking this will set the prt object to my default printer

* * Dim prt As Printer
* * Set prt = Application.Printers(0)

but it doesn't
and application.printers.count correct shows that I have eight
possible printers
so I could cycle through them if there was a prt property for 'default
printer' *but I can't find one

is there a way to do this ?

looks like this will do it
* *application.Printer.DeviceName

and application.printer also has a rightMargin setting
so
?application.printer.RightMargin
*360

how does 360 relate to a 1" margin

if I change the margin using
* * application.Printer.RightMargin = 200
will it apply to any reports that are printed or export to pdf
(access2010)
How does 360 relate to 1". Think not in inches or centimeters.
Think in twips. There's 1440 of them per inch. Divided 360 by 1440
and you have .25.

Regarding your second question...guess you have to try it out. Can
your printer handle .13 inch margins?

Reply With Quote
  #4  
Old   
Patrick Finucane
 
Posts: n/a

Default Re: using the printer object, how do I tell what my default printer is - 11-10-2011 , 10:16 AM



On Nov 9, 6:27*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 9, 5:19*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

I want to set the margins on a report to specific settings
so I'm thinking this will set the prt object to my default printer

* * Dim prt As Printer
* * Set prt = Application.Printers(0)

but it doesn't
and application.printers.count correct shows that I have eight
possible printers
so I could cycle through them if there was a prt property for 'default
printer' *but I can't find one

is there a way to do this ?

looks like this will do it
* *application.Printer.DeviceName

and application.printer also has a rightMargin setting
so
?application.printer.RightMargin
*360

how does 360 relate to a 1" margin

if I change the margin using
* * application.Printer.RightMargin = 200
will it apply to any reports that are printed or export to pdf
(access2010)
Hmmm...thought I responded but it's my response is not here. Anyway,
360 is the number of twips. There are 1440 twips per inch. 360/1440
is .25 inch. 200 twips is .13 inches. Can your printer handle that?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.