New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

How to encode PDF417 Barcodes using VBA in Excel?

The tutorial explains how to encode data in Excel using the PDF417 Font Encoder VBA.

The PDF417 Font Encoder VBA is included in:

PDF417 Font and Encoder for Windows

PDF417 Font and Encoder Package

Universal 2D Font Package

NOTE:
IDAutomation offers a 2D Font for Excel; however, it does have some limitations. It is compatible with Data Matrix, QR Code, PDF417, and Aztec. Microsoft Excel may also be used as a data source for the font, as explained below.

image

Operating System: Windows

Application: Excel

09-26-13     10.4 year(s) ago    

  Report Abuse

 

Ben

Best Answer

NOTE: A new product is now available since this issue was resolved that offers a better way to generate barcodes in Excel on Windows and Mac, the IDAutomation Native Generator for Excel.

1. Download and install a font package that includes PDF417. The package installs the necessary encoders. To generate barcodes directly in Excel, download and install the IDAutomation 2D XLS Font



2. Open Excel and set up the spreadsheet. In the example, data in column A2 will include the data to convert to the barcode. A formula will be written in B2 to produce the encoded data.

image



3. Minimize Excel and locate the VBA file named IDAutomation_PDF417_Macro.bas. It is located in a path similar to:
image

4. Maximize Excel and select the Developer Tab.

image



5. Select Visual Basic to enter the Editor.
image



6. To import the VBA file select File -- Import File then search for and select the IDAutomation_PDF417_Macro.vba.

image

The VBA file will appear in the Modules folder.



7. Select Tools -- References and search for the PDF417 encoder. Choose OK.

image



8. Select File and choose Close and Return to Microsoft Excel.
image



9. In cell B2, enter the formula =IDAutomation_PDF417 and reference cell A2 to encode the data.

image

The encoded data for PDF417 should appear as several numeric characters.

If you receive a Compile Error: Text or Binary, review this solution.


10. Save the file.

GENERATE BARCODE IN EXCEL

(1) Apply the IDAutomation2D XLS font.

(2) Right-click the column and choose Format Cells.
image

(3) Select the Alignment tab and then check Wrap text.
image

HOW TO MAIL MERGE
To generate the barcode the encoded file must be used in a mail merge/data merge. Video Example of 2D mail merge. The only difference between the video and this tutorial is that the video uses the Barcode Add-In encoder and Data Matrix. Begin the video at 2:35.
Video Example

CARRIAGE RETURN ERROR
After merging the data into Word, a group of characters, such as _x000D_, may appear at the end of the merged data. To resolve the issue, return to Excel and implement the SUBSTITUTE function.

Example:

=SUBSTITUTE(IDAutomation_PDF417(A2), CHAR(13),"")

Posted 10.4 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.

Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook