Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Printing to 2 printers

Printing to 2 printers

Printing to 2 printers

Can anybody please help me with the following problem:
I am working with VB6 and use a the internal Datareport component to produce a report.
This report either needs to be printed, faxed or both.
In order to print it, I can do something like:
'Datareport1.printreport False' and the report will print perfectly to the default printer without showing a dialog box. But in the case where this report also needs to be faxed I need to print this to a driver called 'Relayfax printer driver' (I use Deerfield Mdaemon and Relayfax for this part).
But here is my question: the selection of the printer must be achieved automatically (without user intervention through dialogboxes) !
How do I achieve this ?

Many thanks.
Philip Van de Poel
E-mail: pvandepo@capgemini.nl

RE: Printing to 2 printers

I can't find anything in Help except 185 things that are not related. When I serach for Data Report or Printing.

Don't you hate the MSDN.

Seems kinda dumb not to allow you to select a Printer by code.
But that is usually the way with Microsoft they leave out certain things.

Then you are forced to wait and buy the next release...


RE: Printing to 2 printers

I believe the printers collection method in VB will allow you to select a printer by functionality such as:
for each oprinter in printers
if oprinter.duplex then
set printer = oprinter
end if
Also, you can select a specific printer in the collection as:
dim oprinter as printer
set oprinter=printers (2)
Hope this helps

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close