By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

tools for printer programming in Access 2000!

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"bla" <da@chello.nl> wrote:
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
Nov 12 '05 #2

P: n/a
bla
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

"Tony Toews" <tt****@telusplanet.net> wrote in message
news:30********************************@4ax.com...
"bla" <da@chello.nl> wrote:
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

Nov 12 '05 #3

P: n/a
"bla" <da@chello.nl> wrote:
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/A...s/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
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.