• Create barcode for window envelope via VBA – Word

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Create barcode for window envelope via VBA – Word

    • This topic has 1 reply, 2 voices, and was last updated 24 years ago.
    Author
    Topic
    #355836

    Word 97: Without success, I have been trying to add a barcode to the address of a letter (letter and barcode created via VBA code.) The barcode would be used with window envelopes to meet US postal barcode requirements. I’ve used the wdFieldBarCode but keep getting “99” designating that Word cannot interpret the address to generate a valid code. I am trying to pass both the address and the zip code as variables. If anyone can head me in the right direction, I would appreciate it!

    Viewing 0 reply threads
    Author
    Replies
    • #525846

      The way Word uses the barcode field is to put a bookmark around the last couple of lines of the address in the envelope. You can also put the zip code directly into the field, in quotation marks, and get rid of the bookmark switch in the field.

      You may want to download a tutorial that I slapped together to help answer another question about envelopes. It isn’t finished so it isn’t listed on my download page but it should help.

      It has a formatted envelope with a barcode field on the bottom and also has an
      explanation of the EnvelopeExtra AutoText entries in letterhead. When I get it finished, it will be listed with the other downloads on http://www.addbalance.com/word/download/index.htm.

      Hope this helps,

    Viewing 0 reply threads
    Reply To: Create barcode for window envelope via VBA – Word

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: