tools for printer programming in Access 2000!

  • Thread starter Thread starter bla
  • Start date Start date
B

bla

Hello all,

Does anybody have working sample VBA code to change printerdriver in a
report and to get a list of available drivers and there functionality?

It is for Access 2000. This version of Access has no printer collection
object yet. I need to work with the DevMode and DevNames properties of a
report object.

Please, you help me the most if you sent it to my personal email address,
then I will notice directly if you have a solution. Ofcourse you can post it
to the newsgroup for use by others.

My email address starts with 2face. Then, after the @, it ends with
planet.nl

Thanks

Peter
 
bla said:
Does anybody have working sample VBA code to change printerdriver in a
report and to get a list of available drivers and there functionality?

Do you mean you want to change printers termporarily? Then you don't need prtDevMode
and such. Which are a lot of work.

You can change the default printer using updates to the INI file and some sample
code. See DefaultPRT.ZIP at http://www.mcwtech.com/downloads.htm

Finally you can use DevPrtMode however this requires extensive VBA knowledge and is
not for the faint of heart. Also this won't work in MDEs as you must open reports in
design mode although you can use Automation to open a reports MDB and manipulate it
there.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Tony, thanks for your quick response.

It is a multi user progam in Access. Problem is, every user has different
printers. I want to use a A3 printer not everyone has (some reports are
designed on a A3 paper). I want so set the printer name before printing.

I am a advanged programmer, but it is a lot of work and pain in the ass. I
guess it will cost me one day before i solved all GPF's I will encounter
when I do all the work from the beginning.

I allready have code to set printer margins, paper size and orientation. I
first open the report in design mode, make the changes, and then open the
report in preview mode. This works.

It spare me a lot of time, when i have some working code and all Windows Api
function declarations i need.

Peter
 
bla said:
It is a multi user progam in Access. Problem is, every user has different
printers. I want to use a A3 printer not everyone has (some reports are
designed on a A3 paper). I want so set the printer name before printing.

I am a advanged programmer, but it is a lot of work and pain in the ass. I
guess it will cost me one day before i solved all GPF's I will encounter
when I do all the work from the beginning.

I allready have code to set printer margins, paper size and orientation. I
first open the report in design mode, make the changes, and then open the
report in preview mode. This works.

It spare me a lot of time, when i have some working code and all Windows Api
function declarations i need.

Ah, you're already using prtdevmode. See the following article then.

ACC: How to Change a Report's Printer Using Code Q129397
For more information about PrtDevMode and PrtDevNames, search for
"PrtDevMode property" or "PrtDevNames property," using the Microsoft
Access 97 Help Index or please see the following web site:
http://www.microsoft.com/AccessDev/Articles/GetzCh10.HTM

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Back
Top