473,320 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Printing Barcode to TSC barcode printer from VB6

Helo,
i need a help for printing barcode to barcode printer from VB6.
i have TSC TTp-244 Plus barcode printer and they generate their printer programming code in text format and give to me. now i want to generate different barcodes usnig that code. i fill values. i use printer.print command to send these commands to printer. but i can't got the barcode label, insted the codes i were i snded through the printer.print command.

here is the TSC's code they given to me

SIZE 77.5 mm, 24 mm
GAP 3 mm, 0 mm
SPEED 2
DENSITY 12
DIRECTION 0,0
REFERENCE 0,0
OFFSET 0 mm
SHIFT 0
SET PEEL OFF
SET CUTTER OFF
SET TEAR ON
CLS
CODEPAGE 850
TEXT 587,186,"ROMAN.TTF",180,1,8,"LOOK OPTICALS"
TEXT 171,186,"ROMAN.TTF",180,1,8,"LOOK OPTICALS"
TEXT 586,160,"ROMAN.TTF",180,1,7,"Bigboss"
TEXT 170,160,"ROMAN.TTF",180,1,7,"Bigboss"
TEXT 584,135,"ROMAN.TTF",180,1,7,"Rs :"
TEXT 168,135,"ROMAN.TTF",180,1,7,"Rs :"
TEXT 546,138,"ROMAN.TTF",180,1,9,"1456/-"
TEXT 130,138,"ROMAN.TTF",180,1,9,"1456/-"
TEXT 611,117,"ROMAN.TTF",90,1,7,"RCHW"
TEXT 195,117,"ROMAN.TTF",90,1,7,"RCHW"
BARCODE 602,93,"128M",56,0,180,1,2,"!10512345678"
BARCODE 186,93,"128M",56,0,180,1,2,"!10512345678"
TEXT 603,33,"ROMAN.TTF",180,1,7,"12345678"
TEXT 187,33,"ROMAN.TTF",180,1,7,"12345678"
PRINT 1,1

=========================
i fill item code, mrp etc in a Flex grid.

below is my code in VB6.

Printer.Print "SIZE 77.5 mm, 24 mm"
Printer.Print "GAP 3 mm, 0 mm"
Printer.Print "SPEED 2"
Printer.Print "DENSITY 12"
Printer.Print "DIRECTION 0,0"
Printer.Print "REFERENCE 0,0"
Printer.Print "OFFSET 0 mm"
Printer.Print "SHIFT 0"
Printer.Print "SET PEEL OFF"
Printer.Print "SET CUTTER OFF"
Printer.Print "SET TEAR ON"
Printer.Print "CLS"
Printer.Print "CODEPAGE 850"
While i <= crow
ITM1 = Trim(grid.TextMatrix(i, 1))
MRP1 = Trim(grid.TextMatrix(i, 4))
CST1 = Trim(grid.TextMatrix(i, 18))
ITM_CD1 = Trim(grid.TextMatrix(i, 0))

'--------
i = i + 1
If i > crow Then GoTo END_PRNT1
itm2 = Trim(grid.TextMatrix(i, 1))
MRP2 = Trim(grid.TextMatrix(i, 4))
CST2 = Trim(grid.TextMatrix(i, 18))
ITM_CD2 = Trim(grid.TextMatrix(i, 0))

Printer.Print "TEXT 587,186," & """" & "ROMAN.TTF" & """" & ",180,1,8," & """" & "LOOK OPTICALS" & """"
Printer.Print "TEXT 171,186," & """" & "ROMAN.TTF" & """" & ",180,1,8," & """" & "LOOK OPTICALS" & """"

Printer.Print "TEXT 586,160," & """" & "ROMAN.TTF" & """" & ",180,1,7," & """" & ITM1 & """"
Printer.Print "TEXT 170,160," & """" & "ROMAN.TTF" & """" & ",180,1,7," & """" & itm2 & """"

Printer.Print "TEXT 584,135," & """" & "ROMAN.TTF" & """" & ",180,1,7," & """" & "Rs :" & """"
Printer.Print "TEXT 168,135," & """" & "ROMAN.TTF" & """" & ",180,1,7," & """" & "Rs :" & """"

Printer.Print "TEXT 546,138," & """" & "ROMAN.TTF" & """" & ",180,1,9," & """" & MRP1 & "/-" & """"
Printer.Print "TEXT 130,138," & """" & "ROMAN.TTF" & """" & ",180,1,9," & """" & MRP2 & "/-" & """"

Printer.Print "TEXT 611,117," & """" & "ROMAN.TTF" & """" & ",90,1,7," & """" & CST1 & """"
Printer.Print "TEXT 195,117," & """" & "ROMAN.TTF" & """" & ",90,1,7," & """" & CST2 & """"

Printer.Print "BARCODE 602,93," & """" & "128M" & """" & ",56,0,180,1,2," & """" & "!105" & ITM_CD1 & """"
Printer.Print "BARCODE 186,93," & """" & "128M" & """" & ",56,0,180,1,2," & """" & "!105" & ITM_CD2 & """"

Printer.Print "TEXT 603,33," & """" & "ROMAN.TTF" & """" & ",180,1,7," & """" & ITM_CD1 & """"
Printer.Print "TEXT 185,33," & """" & "ROMAN.TTF" & """" & ",180,1,7," & """" & ITM_CD1 & """"
Printer.Print "PRINT 1,1"
'-----------
i = i + 1
Wend

Printer.EndDoc

================

please help me to solve this.

Thanking You

Rajesh Babu A
Sep 19 '11 #1
1 26819
pacmanpk
1 Bit
Hello,

Had you been able to print barcode labels with TSC printer using VBA? I am also trying to figure out how to print using VBA? Can you share your code?

Thanks
Oct 25 '23 #2

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

Similar topics

2
by: Marc Champagne | last post by:
Hi folks, I wish to print on pre-printed continuous forms on a dot matrix printer. My initial intent was to access to printer directly (in raw mode, somehow) in order to send whatever is...
0
by: Chris | last post by:
Hi, I found this code to send print direct to printer. It works perfect. Imports System Imports System.Text Imports System.Runtime.InteropServices <StructLayout(LayoutKind.Sequential)> _...
3
by: RC | last post by:
I am using docmd.printout to send Reports (formatted as labels) to a barcode label printer. I need to collate the labels so that I print lable 1 twice, then label 2 twice, then label 3 twice, etc....
2
by: Ryan Gregg | last post by:
I've got a dot matrix printer that I need to print a line at a time to. This is being used for an audit log on an application and every event that occurs needs to print out right as it occurs. ...
0
by: Robert | last post by:
Hi, I get an IllegalPrinterException trying to print the contents of a DataSet on a Samsung ML1210 printer, says something like "trying to access the printer with illegal settings" The...
1
by: Maileen | last post by:
Hi, I want to print from my ASP page directly to my network printer. For this i use the following code, but everytime, my document to print is sent to local and physical port LPT1 :( could you...
0
by: yulyos | last post by:
Hi, printing to the printer with vb.net from right to left how do i print to the printer from right to left with vb.net example in vb6: Printer.RightToLeft = True
4
by: Rob T | last post by:
I have a small VB program that has a printing module...very simple....and works great. However, If I try to print to a generic printer, I get the following error: "The data area passed to a...
1
by: Monroeski | last post by:
I have a network printer set up right near my office. Throughout the day, reports from a database I created keep popping out from a bunch of different services. It appears that the default printer...
0
by: Tim | last post by:
Our application has used this PrintersClass module for some time without a problem but some new Toughbooks have caused problems. We use laser printers, usually the default choice, and some label...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.