Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
does anybody know how i can write some code in visual basic that can print something on a labelsticker using a zebra printer, where te values are coming from an excelsheet. Also certain cells in this sheet. Regards, ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a page on printing labels with Mail Merge in MS Word
from an Excel database. I imagine if you are set up to print bar codes in Excel that all you need to do extra is to specify the font for the barcode in your Word document for the field. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Tom Ogilvy" wrote in message ... Might be easier to do this with Mailmerge in Word. You can still use excel as the source of the data. Otherwise, you would have to set up the data on the worksheet to mimic the layout on the label, then set page dimensions to match what is needed to position the information propertly on the printer. Unless there is something special about a zerbar printer. "solo_razor" does anybody know how i can write some code in visual basic that can print something on a labelsticker using a zebra printer, where te values are coming from an excelsheet. Also certain cells in this sheet. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can loop through your desired fields, you can send the target
text to the zebra printer (I'm assuming local) via the LPT port of your PC. There are other methods, but this is easiest. Private Sub Command1_Click() Dim strZPL As String Dim lngFileNum As Long Dim i As Long 'Loop through your excel sheet 'Assign a value to strReturn strZPL = "^XA" strZPL = strZPL & "^PF0^FS" strZPL = strZPL & "^FT150,250^A0N,244,224^FD " & strReturn & "^FS" strZPL = strZPL & "^XZ" lngFileNum = FreeFile() Open "LPT1" For Output As lngFileNum 'Open Printer.DeviceName For Output As lngFileNum 'Open "\\ARHTEST\ITTEST" For Output As lngFileNum Print #lngFileNum, strZPL Close lngFileNum 'Continue your loop End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Labelling X and Y axis | Excel Discussion (Misc queries) | |||
conditional labelling | Excel Discussion (Misc queries) | |||
Conditional formula(s) & labelling | Excel Worksheet Functions | |||
CHARTS---X-Y labelling | Charts and Charting in Excel | |||
Labelling at xy scattered chart | Charts and Charting in Excel |