Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Wisconsin, USA
    Posts
    160
    Thanks
    1
    Thanked 0 Times in 0 Posts

    postnet barcodes (VB 6)

    Am working on a VB6 project that has mailing labels in a report. Would like to add postnet barcodes. Have the font, and if the zipcode field is formatted with the barcode font only the 5 or 9 digits appear to be barcoded. Checking with the WOPR's barcode output from the Enveloper, I see a vertical bar before and after the zipcode barcode. Also, there appears to be some additional barcoding.

    How to determine what is needed in barcoding? Then the next question is how to add it to the field to print the proper barcode?

    Thanx.

    Kim
    Thanks

    Kim

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: postnet barcodes (VB 6)

    Kim, if you search the Lounge for postnet, I think someone once posted a link to the USPS page on it. That should give you the legal/technical requirements.

    Word has a built-in field that handles this, and that's all I've ever used. I imagine many VB developers need this, so there might be a control or function that calculates it at one of the many VB sites.

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Wisconsin, USA
    Posts
    160
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: postnet barcodes (VB 6)

    There is precious little on Postnet Barcodes and it appears that you are the 'someone once posted'?
    Thanks

    Kim

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: postnet barcodes (VB 6)

    Well, if you are looking to do this in a Word document, you can use very simple code; the u switch doesn't even appear to be necessary (as shown in the attached). The following sample macro will insert a BARCODE field at the end of the current selection:

    <pre>Sub InsertBarcodeField(strZipCode As String)
    With ActiveDocument
    .Fields.Add Range:=.Range(Selection.End, Selection.End), _
    Type:=wdFieldBarCode, Text:="u """ & strZipCode & """", _
    PreserveFormatting:=False
    End With
    End Sub

    Sub TestBarcode()
    InsertBarcodeField "93888-0102"
    End Sub</pre>

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •