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

changing printer

Status
Not open for further replies.

bartvb

Programmer
Nov 29, 2001
24
BE
I've tried to change the printer settings through visual basic
*****************************************
Report.PrinterSetup (0)
Report.PaperSource = 259
Call Report.PrintOut(false, 1, True, 1, 1)

-- this prints the report from the correct tray, but
-- the user gets a popup window that i don't want

*****************************************


For Each X In Printers
If X.DeviceName = lstPrintList.Text Then
' Set printer as system default.
Set Printer = X
' Stop looking for a printer.
Exit For
End If
Next

Call Report.SelectPrinter(X.DriverName, X.DeviceName, X.Port)

Report.PaperSource = 259
MsgBox Report.Papersource -- the papersource hasn't
--changed ?!
Call Report.PrintOut(false, 1, True, 1, 1)

-- here the user can select the printer from a listbox, but
-- the papersource hasn't changed ?! Why??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top