Assigning a Printer

J

JimP

This is a multi-user environment where several people have developed
reports. Some reports have been saved with "Acrobat PDF" as the printer.

If a user does not have "Acrobat PDF" installed as a printer, the report
prints as desired to their default printer.

However, for the users who do have "Acrobat PDF" installed as a printer, the
reports opens with "Acrobat PDF", even if it is not their default printer.

How can I force the report to always open with a users default printer?
 
A

Alex Dybenko

hi,
You have to set Printer to Default printer in Page setup and then save
report. Changing this at runtime is not a good idea as you need to open
report in design view, so your project becomes not compiled

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
J

JimP

Thank you, It appears my best solution is to go through all of the reports
and change the printer to "default printer" and then recompile the mdb.

Offhand, if I had several hundred reports (or more), it seems like I can
loop through the reports collection - open each report in design view,
assign default printer, save and close the report.
 
J

Jack Leach

Doing a quick search I was able to find that there is an API
GetDefaultPrinter. I saw a few VB examples, but no VBA examples. But if
there's an API, code can be written for VBA to get the value.

Elsewhere (apparently at my house because I cannot seem to find it here), I
have a link that was posted a month or two back which enabled the programmer
to set just about every printing property available. I will look for this
tonight and post back assuming I find it in my mess of bookmarks.

Between the two, you should be able to programmatically handle the situation.

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
J

JimP

Thank you - this is exactly what I need - was hoping all I needed to do was
change a property though.
 
J

Jack Leach

Be warned that this probably won't be an easy task. Also, I'm not positive
it will work, but I *think* you *may* be able to accomplish your task like
this.

Writing code for the GetDefaultPrint API will be a task in itself... but
usually vb examples can be fairly easily modified to vba. Otherwise there
will probably be lots of trial and error using the API (this type of stuff is
above my head, so I won't be able to offer much help if you'll need it).
Hopefully there's an access/vba version out there somewhere that I didn't
come up with quickly.

Also, the code for the printing preferences that I'll post later seems to be
no walk in the park for me. I've yet to try it, but it's the only printing
related code I've come across that seems to cover everything directly through
code (which is why I happily bookmarked it, with a big thanks to Daniel
Pineault(sp?) for posting it). At a brief glance I barely understand what's
going on.

Anyway, don't expect it to be a five-minute setup. Maybe more like five
days devoted entirely to hashing this out. That, and given the fact that I'm
only pretty sure it will work, you may be better off going with some of the
other suggestions. Its a big project to work with to find out that it in
fact won't work, although it would be a very useful tool with some long term
payoffs if it does indeed work.

I'll post that link in a few hours, maybe you can make something work.

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top