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 Aztec Barcodes using VBA in Excel?


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

The Aztec Font Encoder VBA is included in:

Aztec Font and Encoder Package

Universal 2D Font Package

IDAutomation offers a 2D XLS 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.

It is often difficult to use 2D barcode fonts in Excel because of the encoded data's line feeds and carriage returns. Excel may not properly handle these characters in a cell. Therefore, you may receive a barcode that is not properly shaped.

image

Operating System: Windows

Application: Excel

09-26-13     11 year(s) ago    

  Report Abuse

 

Ben

Best Answer

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



2. Run Excel and set up the spreadsheet. Data in column A2 includes the data to convert to the barcode.

image


3. Minimize Excel and locate the VBA file named IDAutomation_Aztec_Macro.bas. It is located in a path similar to:
image 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_Aztec_Macro.vba.

image

The VBA file will appear in the Modules folder.



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

image



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



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

image

The encoded data for Aztec should appear as several alpha characters.



10. Save the file.

HOW TO 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 ENCODED DATA INTO WORD
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

HOW TO RESOLVE 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(EncAztec(A2), CHAR(13),"")


HOW TO ENCODE FUNCTIONS SUCH AS TABS AND RETURNS
To encode functions:
(1) the parameter named ApplyTilde/ProcessTilde must be enabled.
(2) the function must be encoded in the format ~d### where ### is the three-digit ASCII value for the function to encode. In the ASCII chart, a Horizontal Tab (HT) uses the value 9. To encode it in IDAutomation products, use ~d009.


FORMAT:
=EncAztec(DataToEncode,ApplyTilde)


EXAMPLE:
=EncAztec("ABCD~d009EFGH",1)


image

Posted 11 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