Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing to 2 printers

Status
Not open for further replies.

PhilipVDP

Programmer
Feb 28, 2000
2
BE
Can anybody please help me with the following problem:<br>

I am working with VB6 and use a the internal Datareport component to produce a report.<br>

This report either needs to be printed, faxed or both.<br>

In order to print it, I can do something like:<br>

'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).<br>

But here is my question: the selection of the printer must be achieved automatically (without user intervention through dialogboxes) !<br>

How do I achieve this ?<br>

<br>

Many thanks.<br>

Philip Van de Poel<br>

E-mail: pvandepo@capgemini.nl<br>


 
I can't find anything in Help except 185 things that are not related. When I serach for Data Report or Printing.<br>
<br>
Don't you hate the MSDN.<br>
<br>
Seems kinda dumb not to allow you to select a Printer by code.<br>
But that is usually the way with Microsoft they leave out certain things.<br>
<br>
Then you are forced to wait and buy the next release...<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Philip,<br>
I believe the printers collection method in VB will allow you to select a printer by functionality such as:<br>
for each oprinter in printers<br>
if oprinter.duplex then<br>
set printer = oprinter<br>
end if<br>
next<br>
Also, you can select a specific printer in the collection as: <br>
dim oprinter as printer<br>
set oprinter=printers (2)<br>
Hope this helps<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top