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
Variable Pictures
QR BarCodes
Sorting for Guillotining
Repositioning Data
Pantone Colors
Saving VBA Code to a Previous Version of CorelDraw
Trim Marks
Miscellaneous VBA
Code 39 BarCodes Without Corel's BarCode Wizard

To automate the production of barcodes using CorelDraw's Wizard you must use SendKeys. This is a slow and unreliable way of creating bar codes. The "Human Readable" text associated with Code 39 bar codes from Corel's BarCode Wizard has a variable format. For some input strings the output human readable string has double spacing between the characters, although the barcode is still OK. I cannot recommend the Corel's BarCode Wizard for Code 39 fonts.

Instead use The barcode creation is fast and reliable. There is no Human Readable text but this you can add yourself. He even provides a means to check the validity of the input string. The font is only suitable for a total of 43 characters. The characters are upper case characters, digits and the characters -, ., $, /, +, % and space. The barcode only requires an asterisk both before and after the input string and the use of the supplied font. As a result a code 39 barcode can easily be created manually in CorelDraw, Word, Excel or Access. Another font that can be used and is available on the internet is 39251.TTF.

First install this font called code39.ttf that I have downloaded from on your computer then type in the barcode characters with asterisks at the start and end. e.g. *12358*
Select the whole character string, including the asterisks, and change the font to "Code 3 de 9" and the barcode will be created. Remember this font is limited to creating barcodes from capital letters and digits only or a mixture of both.

Automatic creation of Code 39 barcodes is fairly easy. Insert a string in the document with leading and trailing asterisks and change the string font to "Code 3 de 9".
Do not attempt to use Corel's PrintMerge with this method as PrintMerge ignores asterisks and so the barcode will be wrong.

To check a barcode simply select the barcode and change the font back to Arial and you can read the input data. Remember the input data must start and finish with an asterisk.

Here is a CorelDraw X6 program that will create sequential Code39 barcodes and also display a progress meter.

If you want to supply the finished barcodes in pdf form then you must convert the barcodes to curves otherwise the barcodes will not appear.

In the rare instance you need a check digit. You must calculate the check digit and place it at the end before the last asterisk. There are mainly only 2 types of check digits used for Code 39. Modulo 43 and Modulo 10.

Modulo 10
Modulo 10 is used on barcodes that contain only digits no letters.

e.g. If the numbers are 795402 the digit on the right, 2 is multiplied by 3, the next digit, 0 is multiplied by 1, the third digit, 4 is multiplied by 3, the fourth digit 5 is multiplied by 1, the next by 3 and the next by 1 and so on.
The digits from the right to left are multiplied by 3 then 1 then 3 then 1 and so on until all the digits are multiplied. The answers are the added.

2x3 + 0x1 + 4x3 + 5x1 + 9x3 + 7x1 = 57

Now since 57 cannot be divided by 10 without a remainder what is the difference between 57 and the next multiple of 10.
In this case the next multiple of 10 is 60 so the difference is the check digit 3.
You would then enter *7954023* as your string from the barcode.

If the sum had been 50 then the check digit would have been 0.