IDAutomation.com, Inc.

MS Office Bar Code Macros & VBA Functions for Excel, Access and Word.

Our barcode macros used in Excel to format a POSTNET barcode.

This website offers bar code macros and functions for the intermediate to advanced Microsoft Office user. If you are looking for the easiest method of implementing barcodes in Office, please visit our OfficeBarcode.com site. It is dedicated to barcoding in MS Office.

[BizFonts.com Home Page | Excel Barcode Macro Tutorial ]
[Word Mail Merge Tutorial | Access Macro Tutorial]
[ActiveX DLL | Barcode Printing Application | Crystal Reports UFL]

Our Bar Code VBA macros for Microsoft Excel, Word and Access work with our POSTNET, Code 39, Interleaved 2 of 5, Code 128, UPC-A, EAN-13, EAN-8, UCC-128, MSI / Plessy, Code 11, RM4SCC, 4-State, EAN-14, SSCC-18 and SCC-14 barcode fonts and specifications. The macros (which consist of VBA code and functions) will generate check digits, add the start and stop characters and format the return string for one of our barcode fonts. The macros can be easily integrated into your application for automation purposes and you don't have to be a programmer to use them. The barcode macros and functions are easy enough for intermediate and advanced users of Excel or Access. 

The macros and VBA functions are ready to install and are only designed to calculate barcode strings for the barcode fonts available at the http://www.BizFonts.com website and from IDAutomation.com, Inc. The macros, functions and Visual Basic source code are free to use as long as you are using them with one of our barcode fonts. They are compatible with Microsoft Office 97 and Microsoft Office 2000.

We also sell easy to use "drag and drop" ActiveX Controls that may be easier to use in your application. Our ActiveX Controls have been tested in Microsoft Word, Access, Excel, Visual Basic and C++. To see how easy they are to use, view the ActiveX Control tutorial site.

Please refer to the PDF417 Site for information on using PDF417 with MS Office.


The Following Macros are Available for MS Office:

NOTE: You must use Interleaved 2 of 5 fonts dated May 1, 2001 or later for Interleaved 2 of 5 functions. You MUST use Code 128 fonts dated December 2000 or later for Code 128 functions. 

For all functions below the data input type is a single string. A number may be required for additional parameters. For example, Code128c("123456",0). For all number symbologies such as POSTNET and UPC, you may input dashes or spaces for easier readability and they will be filtered out by the function before the barcode is generated. For UPC-A, UPC-E & EAN-13 you can enter the +2 and +5 add-on codes by just adding them to the end of the string. 

Function Notes
Code128a() Use the characters from set B to print characters not on the keyboard; the scanner will scan characters from set A. Formats output to the Code 128 barcode fonts.
Code128b() Returns codes formatted to the Code 128 character set B. Formats output to the Code 128 barcode fonts.
Code128c(Data, Number) This code128 function "interleaves" numbers into pairs for high density.
(Data, 0) formats output to the Code 128 barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
I2of5() This function "interleaves" numbers into pairs for high density without check digits and formats the return string to the Interleaved 2 of 5 font.
I2of5Mod10(Data, Number) (Data, 0) performs the mod10 checksum calculation for increased accuracy and formats the return string to the Interleaved 2 of 5 font. MOD 10 checksums are required by USPS for special services and for SSC-14 when using Interleaved 2 of 5 for that purpose.
(Data, 1) returns the human readable data with the MOD10 check digit included.
(Data, 2) returns the MOD10 check digit.
Code39() Formats the output to print using Code 39 fonts.
Code39Mod43(Data, Number) (Data, 0) performs the mod43 checksum calculation for increased accuracy and then formats the output to print using Code 39 fonts. The mod43 checksum is usually required for LOGMARS and HIBC applications.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
Codabar() Formats the output to print using Codabar fonts.
UCC128() Use this function for UCC/EAN-128 applications when you have already generated your MOD10 check digit if required. Supports UCC-128, EAN-128, SCC-18 and SCC-14. FNC1 automatically included after start digit, enter "FA" between even numbers for additional FNC1 Codes. Formats the output to print using Code 128 fonts.
SCC14(Data, Number) SCC14(Data, 0) generates the MOD10 required and then formats the output to print EAN-14 and SCC-14 using Code 128 fonts. The input for Data must be a 13 to 17 digit number, however, only 13 are needed. The required application identifier of (01) is automatically added.
SCC14(Data, 1) returns the human readable data for SCC14 / EAN14.
SCC14(Data, 2) returns the MOD10 check digit.
SSCC18(Data, Number) SCC18(Data, 0) generates the MOD10 required for SSCC-18 and then formats the output to print SSCC-18 using Code 128 fonts. The input for Data must be a 17 to 21 digit number, however, only 17 are needed. The required application identifier of (00) is automatically added.
SCC18(Data, 1) returns the human readable data for SCC-18.
SCC18(Data, 2) returns the MOD10 check digit.
Postnet(Data, Number) Enter a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point. The input for Data must be a number and can include dashes and spaces.
(Data, 0) formats output to the POSTNET barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
USPSss(Data, Number) Used for 20 digit USPS special services numbers with Code 128 fonts. Enter a 19 or 20 digit number; only the first 19 are used.
(Data, 0) formats output to the Code 128 barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
RM4SCC() Formats the output to print using RM4SCC fonts. Checksum calculated according to the mailsort customer barcoding specification.
MSI(Data, Number) (Data, 0) formats output to the MSI barcode fonts.
(Data, 1) returns the human readable data with the check digit included.
(Data, 2) returns only the check digit.
Code11() Only the "C" check digit is calculated which is the standard when encoding 10 digits or less.
UPCa() Enter UPC-A with or without a check digit, add-ons are supported. Formats output to the UPC/EAN barcode font.
UPCe() Enter the full 11 or 12 digit UPC-A number. The purpose of this function is to print the UPC-E barcode from a UPC-A barcode that can be compressed. It will print a UPC-A if it cannot be compressed by zero suppression rules. Formats output to the UPC/EAN barcode font.
EAN13() Enter EAN-13 with or without a check digit, add-ons are supported. Formats output to the UPC/EAN barcode font.
EAN8() Enter exactly 7 characters (EAN-8 without the check digit). Formats output to the UPC/EAN barcode font.

Tutorial for Using VBA Barcode Macro Functions in Excel:

After you have downloaded and extracted the files, open the Excel spreadsheet provided. If asked to enable Macros, choose Yes.  View the formula in the cells listed under the "Barcode To Scan" column. It is this formula that retrieves the data to encode and passes it to the appropriate barcode function. The function will then format the data to encode in a string formatted to the barcode font. 

Our barcode macros used in Excel to format a POSTNET barcode.

Then, the font must be selected for the cell and MUST be the same symbology as in this example were we selected the AdvPNET font to create a POSTNET barcode.

Our barcode macros used in Excel to format a POSTNET barcode.  If your function does not require parameters, you may simply enter it without the ",0" like this "=Code128b(B15)" for example. You may change the font back to something like "Arial" to see the result if the barcode does not scan or for troubleshooting. Fully functional versions of our fonts must be installed to create a proper barcode.

The VBA code and functions reside inside the Excel file. This makes it easy to deploy barcode applications for users that already use Excel. To use these functions in another Excel file you must first export the module and import it into the other Excel spreadsheet. 


Tutorial for Using VBA Barcode Macro Functions in Access:Sample reports provided in Access 2000

After you have downloaded and extracted the files, open the Access Database provided.  The database we provide contains one table, some sample reports and one module. The module contains the VBA code, functions and macros. To pass data to the function and return it in a report you would place the formula  =function([table.field])  in the control source field. control source in Access 2000 for SSCC-18 barcode View the design of the reports to gain an understanding of how the bar code macros work. Fully functional versions of our fonts must be installed to create a proper barcode.

The VBA code and functions reside inside the access database as a module. This makes it easy to deploy barcode applications for users that already use Access. To use these functions in another Access file you must copy the module to another database or first export the module and then import it into the other database. 


Tutorial for Using VBA Barcode Macro Functions in Word:

Microsoft Word does not have the capability to call VBA functions from within a document or mail-merge like Excel and Access can. Therefore, to barcode in MS Word, it is necessary to use Excel as the data source for the mail merge. The field used for the data source in Word should point to the column in Excel where the formula has already been applied.

After you have downloaded and extracted the files, open "MS Word Mail Merge.doc". You may get a message stating that the data source cannot be found. If this happens, choose "Data Source for Word Mail Merge.xls" as the data source. If asked to enable Macros, choose Yes.

In Excel, you can view the formula in the cells listed under the "Barcode" column. It is this formula that retrieves the data to encode and passes it to the appropriate barcode function. The function will then format the data to encode in a string formatted to the barcode. This column is then passed to Word when the mail merge is started. Then, the barcode font must be selected for the field in MS Word (in this case it is «Barcode») and it MUST be the same symbology. The barcode will not look correct and will not scan until the mail merge is performed because before the mail merge, only the field is displayed. Fully functional versions of our fonts must be installed to create a proper barcode.

The VBA code and functions reside inside the Excel file, not the MS Word file. This makes it easy to deploy barcode applications for users that already use Word and Excel. To use these functions in another Excel file you must first export the module and import it into the other Excel spreadsheet. 


View our product index to obtain a list of all products we offer.

 

 Quick Links: [IDAutomation.com Home | FontsActiveX | Java | Scanners]

Copyright © IDAutomation.com, Inc.  All rights reserved. All trademarks mentioned are the property of their respective owners.