CorelDraw & VBA
Summary & Introduction
Guide to CorelDraw VBA
Creating Variable Data
Variable Data From Access
Variable Data From Excel
Variable Data Without a Data File
CorelDraw BarCode Wizard
EAN13 BarCodes Without The Wizard
Code 39 BarCodes Without The Wizard
ITF-14 BarCodes Without The Wizard
Code 128 BarCodes Without The Wizard
QR BarCodes
Variable Pictures
Sorting for Guillotining
Repositioning Data
Pantone Colors
Saving VBA Code to a Previous Version of CorelDraw
Trim Marks
PhotoPaint
Miscellaneous VBA
Help
 
Code 128 BarCodes Without Corel's BarCode Wizard



There are several types of Code 128 barcodes.
The barcode is based on either or a combination of 3 tables, Table A, Table B & Table C.
Each table contains 106 characters.
Table A & Table B are very similar.
Table A has upper case characters, numbers & special characters.
Table B has upper & lower case characters, numbers & some special characters.
Table C has number pairs. eg. 00, 01, 02, 03, ....98, 99. Using number pairs Table C can compresses the barcode if it contains some numbers.

It has come to my attention that the Code 128 barcode I have been recommending does not work correctly for Table C characters.
The code did not like numbers containing double zeros.
I did not write this code but I have looked at the code and now modified it and added some comments to the code.
I cannot guarantee that the code works in all circumstances.
If you discover and error please let me know.

A barcode only using Table A is known as Code128A, similaly for Tables B & C.
An optimised version uses a combination of all 3 tables to keep the barcode short.
The example supplied here creates an optimised barcode.

First install this font called code128.ttf that I have downloaded from http://grandzebu.net. on your computer.

Here is a CorelDraw X6 program that will create an Optimised Code128 barcode.
It is the same as CorelDraw's Code 128 barcode that is not an EAN-128 type, does not ignore brackets and does not ignore spaces as in CorelDraw's Advanced settings.

If using the CorelDraw Code128 Barcode Wizard in the Advanced Options section do not select EAN-128 as this is a limited Code128 barcode.
Do not ignore "9" and "0".
Do not ignore spaces.
CorelDraw's Code128 barcode does not seems to create a Type A barcode only types B & C automatically.

Issue date 2024_05_28