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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I select a printer before printing a report

Status
Not open for further replies.

poliv

Programmer
Jun 3, 2000
48
0
0
US
Hi,

My problem is that, I want to select a printer to print a report, but I don't want to display the print dialog box.

If it's no possible to do this without showing the print dialog box, I want to now, how can I disable the other buttons and options in the print dialog box.

Thanks
 
Hi,
to slect a printer within a program

Dim P as Printer, OldP as string
OldP = Printer.DeviceName
For Each P In Printers
If P.DeviceName = "Name of Printer" Then
Set Printer =P
End If
Next

'Print here

For Each P In Printers
If P.DeviceName OldP Then
Set Printer = P
Exit For
End If
Next


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top