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 a \\Servername\Printer 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I have need to print to a barcode printer which is attached to the network with an HP Jet direct box.<br><br>The sample BASIC program I have shows how to print to LPT1:<br>How can I change this to print to a network pirnter.<br><br>the port name is SATO_CL608 <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
If you're running in a DOS window or on&nbsp;&nbsp;a DOS box using LAN Manager to connect you could try capturing LPT1: to the network printer then still printing to LPT1:.&nbsp;&nbsp;I believe the syntax in Net Use lpt1: \\serv\prshare <p> Jeff<br><a href=mailto: masterracker@hotmail.com> masterracker@hotmail.com</a><br><a href= > </a><br> Of all the things I've lost in life, I miss my mind the most ...
 
Ok,<br>I'm not using DOS. I'm using Visual Basic 6<br>But unless one wants to shell out $500.00 to $1000.00 for barcode label software. You have to use the Print #1 commands in VB.<br><br>I want to print direcly to the printer but it uses Chr$(27) &quot;ESC&quot; commands<br><br>Like Print #1, Chr$(27);&quot;W&quot;;&quot;Z1&quot;<br><br>etc. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Actually, from a Windows app I thingk the option of capturing the port has even a better chance of success.&nbsp;&nbsp;You're writing to the device through API calls so if the device is redirected through the OS to a network share a program that prints the way you describe should work. <p> Jeff<br><a href=mailto: masterracker@hotmail.com> masterracker@hotmail.com</a><br><a href= > </a><br> Of all the things I've lost in life, I miss my mind the most ...
 
Hey it works perfect :)<br>Thanks a million<br>I made a&nbsp;&nbsp;batch file called CAPLPT3.BAT file which contains.<br><br>Net Use LPT3: \\SMALLBSERVER\HP5000Nsbs5<br><br>And sent the words &quot;this is a test&quot; to our HP LaserJet 5000<br>using Acceess '97 with this BASIC code.<br><br>Open &quot;LPT3&quot; For Output As #1<br>&nbsp;&nbsp;&nbsp;&nbsp;Print #1, &quot;this is a test&quot;<br>Close #1<br><br>I also voted you a purple star!!!!!<br><br>:)<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Glad to see it worked.&nbsp;&nbsp;<br><br>If you're on NT I believe you could also add &quot;/persistent:yes&quot; to the command and won't have to run it every time you boot. <p> Jeff<br><a href=mailto: masterracker@hotmail.com> masterracker@hotmail.com</a><br><a href= > </a><br> Of all the things I've lost in life, I miss my mind the most ...
 
Like this?????<br><br>Net Use LPT3: /persistent:yes \\SMALLBSERVER\HP5000Nsbs5<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Net use lpt3: \\smallbserver\hp5000nsbs5 /persistent:yes <p> Jeff<br><a href=mailto: masterracker@hotmail.com> masterracker@hotmail.com</a><br><a href= > </a><br> Of all the things I've lost in life, I miss my mind the most ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top