Microsoft Office Code 39 Barcode Tutorial
The Code 39 font is the easiest barcode symbology to use in Microsoft Office. Creating the barcode is as simple as appending the data with the start and stop characters of an asterisk (*) or exclamation point (!).
- Code 39 Fonts in Access
- Code 39 Fonts in Excel
- Combining Multiple Columns in Excel
- Creating an Entire Column of Barcodes
Check characters are used in high-density barcodes so that scanners can verify the barcode was properly read. Self-checking fonts such as Code 39 and Codabar have checking code built-in so that the calculation of check characters is not required. Self-checking fonts are easy to use in Microsoft Access and may be entered directly from the keyboard. If these self-checking barcode fonts cannot be used, refer to the Access Barcode Integration Guide for proper product suggestions.
For example, to create a barcode that encodes the data "1234ABCD" with the Code 39 Font, use the following formula =("!" & [Table.Field] & "!") in the control source field where Table.Field points to the table and field that contains the data to encode.
Tabs and returns may be added with Code 39 fonts (in extended39 mode) between fields from a Microsoft Access report by inserting =("!" & [Table.Field] & "!") in the control source field where Table.Field points to the table and field that contains the data to encode. The following Microsoft Access formula places a tab function (in extended39) between fields: =("!"&[DataField1] & "$I" & [DataField2] & "!")
Below is an example of the above formula in a text field on a report:
If a non-self-checking, high-density barcode is preferred, IDAutomation provides font encoders such as VBA Macro Functions that can be utilized in conjunction with IDAutomation fonts to automatically format the start, stop and check characters to the barcode fonts.
Self-checking barcode fonts such as Codabar (numbers) and Code 39 (numbers and uppercase letters) are the easiest to use in Excel when encoding numbers and/or uppercase letters. Self-checking fonts have checking code built-in so that the manual calculation of check characters is not required. If these self-checking barcode fonts cannot be used, refer to the Excel Barcode Integration Guide for proper product suggestions.
IDAutomation's self-checking barcode fonts may be generated as a calculated field in Excel. The following tutorial demonstrates how this can be achieved.
- To create a proper barcode with a self-checking barcode font, start and stop characters must be added to the beginning and ending of the data being encoded. These start and stop characters are easily added to IDAutomation's Codabar and Code 39 fonts with the asterisk * character.
- The start/stop character may be easily added to the beginning
and ending of the data being encoded with a simple Excel formula
of ="*" & CELL & "*" where CELL
is the cell of the data being encoded in the barcode.
- After the formula is entered in the cell, select the correct font and a barcode should appear. IDAutomation fonts with
XS heights are specifically designed for Excel to automatically adjust to the correct column height. The width of the column may need to be sized to contain the entire symbol.
- Print and scan the barcode to verify the correct data is encoded. If a scanner is needed to verify barcodes, IDAutomation recommends the IDAutomation USB Barcode Scanner.
Tabs and returns may be added with Code 39 fonts (in extended39 mode) between cells by inserting "$I" (for a tab) or "$M" (for a return.) For example, the following formula encodes a tab between cells A1 and B1: =("*"&A1&"$I"&B1&"*")
Learn more about combining multiple cells into a single barcode.
IDAutomation's barcode fonts provide an easy method of barcoding an entire Excel column. Code 39 barcodes are created in an Excel spreadsheet in this example, with the IDAutomationC39 font that is included in the Code 39 Barcode Font Package. Codabar fonts may also be used to create smaller numeric-only barcodes. For fonts other than Codabar and Code 39, refer to IDAutomation's VBA Macro Tutorial for Microsoft Office or the Barcode Integration Guide for Excel.
- In this example, barcodes are created in Column B from data in Column. Enter the formula
="*"&A2&"*" in cell B2 to append the
required asterisks to the text from cell A2:
- Select the cell containing the formula and choose Edit -
Copy. Highlight the entire column by selecting the rectangle
labeled "B" at the top of the spreadsheet and choose Edit - Paste.
The formulas may take some time to re-calculate if the spreadsheet
- With the entire
column that contains the formula selected, choose the IDAutomationHC39S
or IDAutomationHC39XS font included in the Code 39 Font Advantage
Package, or an appropriate font of your choice. IDAutomation fonts with XS heights are designed to automatically adjust to the smallest format and automatically adjust to the correct column height.
The barcodes will then appear in the entire column.
- With the entire column that contains the formula still selected, choose the appropriate point size. In this example, 12 points is used. With the entire column that contains the formula highlighted, choose the center text option so the barcode is in the center of the field. Size the column so it is wide enough to contain the generated symbol.
- Print and scan the barcode(s) to verify the correct data is encoded. If a scanner is needed to verify barcodes, consider the IDAutomation USB Barcode Scanner which dependably scans Code 39 barcodes printed as small as 6 points.