We have some ancient vb6 program that creates barcode using printer objects that relies on window fonts, which works fine with code39. Recently we need to switch the font to code128, after some work we converted the input into code128 format string, and trying print using the same method, however, the printout does not seem right (strange thing is, when we copy the converted string into excel and use the same code 128 font to print it out, it display and print out prefectly)
I was wondering if anyone had the same experience, if so, can anyone shred some lights please?
The following are the code we used to print out barcode
dim sOrg as string
sOrg = "12345888"
printer.fontName = "code39"
printer.print sOrg 'This prints it out perfectly
'However when we change font to code
'this returns Í,BZx}Î which can be copy onto Excel and print out properly
sOrg = convertTo128(sOrg)
printer.fontName = "Code 128"
printer.print sOrg 'print out with part barcode line, part squares
Í,BZx}Îis printed as ascii glyphs then the printer did not use your Code128 font. AfterPrinteris set to the correct device useprinter.fontName = "Code 128" : msgbox printer.fontNameto make sure it's set to "Code 128". If you see something else check the font list to see if you are using the correct name:for i = 0 to printer.fontCount: debug.? printer.Font(i): next- Alex K.1Í,BZx}Îin my code128 font = tinypic.com/view.php?pic=2d0o1f4&s=8#.UxmtLInesfQ - Alex K.