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 Bookmark and Share
FulanoNadie

How to Import and Use 2D VBA Font Encoder in Excel to Word Mail Merge

We bought a 2D barcode font from IDAutomation and were wondering if you could walk us through the best use of your 2D VBA Font Encoder in an Excel to Word Mail Merge.

Operating System: Windows

Application: Microsoft Excel, Microsoft Word, Microsoft Office

06-04-13     2207 day(s) ago    

  Report Abuse

 

James

Best Answer

I will provide instructions beginning to end on how to generate a barcode from Excel to Word for Mail Merge using 2D barcode fonts and the respective 2D VBA Font Encoder included with the 2D font purchase.

Data Matrix will be used for the purpose of this tutorial.

Other 2D barcode types:
Aztec
QR Code
PDF417
Maxicode

DOWNLOAD AND INSTALL
* Download and install the 2D barcode package.

* From the download, locate the IDAutomation_DataMatrixFontEncoder.exe or IDAutomation_DataMatrixWindowsFontEncoder.exe file and install the encoder.

EXCEL
* Press ALT and F11 to open the VB editor.

* In the Visual Basic Editor, select File - Import File and browse to the Program Files/IDAutomation.com DataMatrix Font and Encoder for Windows folder and select the .bas file. For this example, we use the file named IDAutomation_Datamatrix_Macro.bas:

image

* In the Visual Basic Editor, select Tools – References and select IDAutomation Data Matrix Barcode, then click OK:

image

* Save Workbook and close the Visual Basic Editor, returning to the Worksheet.

* After the file is imported, the IDAutomation_DataMatrix function may be called according to:

EncDM(DataToEncode As String, Optional ProcessTilde, Optional EncodingMode, Optional PreferredFormat)

The zero digit is the default for all parameters (which are optional) and is used for automatic mode or a false setting. The one digit is used for a true setting.

* Choose cell to encode (fx, User Defined Category, EncDM):

image

* Press Ok, Choose cell for DataToEncode:

image

Result:

image

* To avoid an _x000D_ issue that may occur in the Mail Merge, apply Excel's SUBSTITUTE function to replace the carriage return (character 13) and copy formula to all other cells so that their data will be encoded as well:

image

* Save and Close Excel Workbook

WORD
* Open Word and perform a Mail Merge. Users inexperienced with Word should use the Mail Merge Wizard or visit the Microsoft Office Website:

image

* Insert the Merge Fields:

image

* When the Barcode field is merged and previewed, spaces may appear between the encoded data:

image

* Choose the No Spacing option in the Home tab:

image

* Apply the barcode font to the field. Here, the IDAutomationDMatrix (or the IDAutomation2D.ttf) barcode font is applied (although you may see slight horizontal lines in the barcode, it will print and scan correctly):

image

Posted 2207 day(s) ago

()
()
  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 2019 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