×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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 Network Printer

Printing to Network Printer

Printing to Network Printer

(OP)
Hi,
How do I print to a network printer from my VB program? I am using the Open statement to open the network port for Output followed by a Print statement to the file handle for the network printer. However, the print job was not printed. How do I go about doing this? The method does work for my local printer. Any help will be greatly appreciated.

RE: Printing to Network Printer

You donĀ“t need to do that anymore in VB, you can use the printer object and then use the printer.print method to print to the printer you want
I saw an example somewhere in the book

dim x as printer

x = thenetwork printer


set printer = x

RE: Printing to Network Printer

if you code printer.print "Hello" Hello will be sent to DEFAULT printer. If this is not what you want you could use a common dialog box using the showprinter method to allow the user to select a printer. or query the printer collection as mentioned above for a printer that meets your criteria and the use the set printer = x when your routine finds a match

RE: Printing to Network Printer

(OP)
Hi,
Thanks for the replies. Am I right to say that in the reply by hug, "thenetwork printer" refers to the network printer name?
How do I ensure that the printer do not format the text at all. I want to print some files which must not be formatted at all. That is, the output must look like that printer in DOS mode!
Once again, thanks.

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