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" <ttoews@telusplanet.net> wrote in message
news:303g10da8nl71j8unpbbe6uq03us91ensb@4ax.com...[color=blue]
> "bla" <da@chello.nl> wrote:
>[color=green]
> >Does anybody have working sample VBA code to change printerdriver in a
> >report and to get a list of available drivers and there functionality?[/color]
>
> Do you mean you want to change printers termporarily? Then you don't need[/color]
prtDevMode[color=blue]
> and such. Which are a lot of work.
>
> You can change the default printer using updates to the INI file and some[/color]
sample[color=blue]
> code. See DefaultPRT.ZIP at
http://www.mcwtech.com/downloads.htm
>
> Finally you can use DevPrtMode however this requires extensive VBA[/color]
knowledge and is[color=blue]
> not for the faint of heart. Also this won't work in MDEs as you must open[/color]
reports in[color=blue]
> design mode although you can use Automation to open a reports MDB and[/color]
manipulate it[color=blue]
> 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[/color]