473,657 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending plain text to a printer port

1,276 Recognized Expert Top Contributor
I am trying to print UPS shipping labels using a Zebra label printer. Apparently these printers have the label form programmed into the firmware and all I have to do is send a particular string of text to the port the printer is connected to (USB) and voila, the printer makes the label correctly.

How do I send unformatted text to a printer port using MS Access? I've got version 2003 in a Win XP environment.

Thanks!
Jim
Nov 5 '07 #1
4 9636
ADezii
8,834 Recognized Expert Expert
I am trying to print UPS shipping labels using a Zebra label printer. Apparently these printers have the label form programmed into the firmware and all I have to do is send a particular string of text to the port the printer is connected to (USB) and voila, the printer makes the label correctly.

How do I send unformatted text to a printer port using MS Access? I've got version 2003 in a Win XP environment.

Thanks!
Jim
Try the following code to send unformatted Tetxt to a Local Printer at LPT1:
Expand|Select|Wrap|Line Numbers
  1. Open "LPT1" For Output As #1
  2. Print #1, "This is just a Test"
  3. Close #1
Nov 9 '07 #2
wvmitchell
42 New Member
Try the following code to send unformatted Tetxt to a Local Printer at LPT1:
Expand|Select|Wrap|Line Numbers
  1. Open "LPT1" For Output As #1
  2. Print #1, "This is just a Test"
  3. Close #1
I think that should be "LPT1:" notice the colon.
Nov 11 '07 #3
ADezii
8,834 Recognized Expert Expert
I think that should be "LPT1:" notice the colon.
Thanks for pointing that out to me.
Nov 11 '07 #4
FishVal
2,653 Recognized Expert Specialist
..... printer is connected to (USB) ......
I suppose that printer port is called "USBxxx" instead of "LPTx:". That should be checked in the printer properties.

Regards,
Fish.
Nov 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
16700
by: Chuck Rittersdorf | last post by:
Hi There I am having a problem using the win32 API from VB6. I am trying to send a command string to a printer(zebra TLP 2742) on LPT1 using the folowing API functions CreateFile and WriteFile I have written C code which works fine, just the VB translation/port
0
1211
by: notregister | last post by:
Hi, i have trying to send a PCL file to a printer using the following codes, but the printer would normally hang for a long time after i have send the command, and i do not know what wrong with it, this are ample code i found in msdn, and yet it could not work, pls advise Thanks Public Function PrintChunkParallel(ByVal lPort As Long, ByVal Chunk As String) As Long 'currently only for LPT1 only
4
4222
by: Schwarty | last post by:
I hope I posted this to the correct group. If not, please let me know and I will get it posted in the correct section. I have a web application developed in ASP.NET using C# for the code behind. I need to be able to print shipping labels from a web page within this application. The shipping label data is pulled from a 3rd party application and comes in binary format specific for certain brands of label printers. I have a class library...
2
3020
by: jabdulius | last post by:
Hi all, I'm trying to send a page using Perl via the WCTP protocol. For some reason, I cannot connect to the host "wctp.att.net/WCTP" (or any host for that matter). I figure it must be some server configuration that I need to set. I don't think it's a port problem b/c I'm able to send a page via WCTP using the same port using a stand-alone app. Anyhow, here's the code I'm using: sub send_wctp_old{ #my $url =...
2
4445
by: hari | last post by:
Hi all, I need to automate printer command testing, prinetr supports parallel/ serial/USB.How can i send the commands from python to printer. I have got pyparallel, as am new to python, no idea how to work on it. Please give some tips,The comamnd to be sent to the printer is hex data "1B 40".please give a example,it will be grateful.
10
18217
by: sklett | last post by:
I'm trying to send some printer commands (ZPLII) to an attached USB printer using the SerialPort component. I didn't get very far at all. In fact I haven't gotten anywhere. The first problem I encountered is that a call to SerialPort.GetPortNames() returns an empty string. In other words, NO port names are returned. I'm not terribly knowledgable about ports but from the Hardware Manager I did notice that I don't have the Ports and...
0
2875
by: Charles Crawford | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection mapped to a serial port. The application I'm writing runs on a Windows Mobile 5 device, so there's no built in printer support and I have to use a serial port. When I try to write the zpl code to the serial port, the printer simply prints the code...
0
3765
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection mapped to a serial port. The application I'm writing runs on a Windows Mobile 5 device, so there's no built in printer support and I have to use a serial port.
31
12674
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it is working for normal email servers, but NOT with gmail server, I am very puzzled still!!) Codes(item c below) It keeps complaining and logs and codes are below. a) apache access logs --------------------------------- 127.0.0.1 - - "GET...
0
8394
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.