
Australia Post Barcode in Word
Requirements
- Download and install the barcode generator
We strongly suggest you to visit the Barcode Quality Program page on the Australia Post web site and read the Customer Barcode Technical Specifications document that describes requirements for dimensions, bar density and placement of barcodes.
Creating an Australia Post Barcode
Australia Post allows to produce barcodes that contain only these FCC codes without asking authorization from them:
FCC | The FCC meaning | No. of bars |
11 | Standard Customer Barcode | 37 |
59 | Customer Barcode 2 | 52 |
62 | Customer Barcode 3 | 67 |
The minimum required bar width and gap size of the barcode are 0.4/0.4mm. The maximum bar width and gap size are 0.6/0.7mm. In this example, we draw all barcodes with bar/gap = 0.5/0.5mm.
So, the Standard Customer Barcode (FCC 11) must have the width of 36.5mm. If a barcode with FCC=59 is produced, the required barcode width is 51.5mm.
The barcode height is always 5mm (min/max values allowed by the Technical Specifications are 4.2/5.8mm).
The Code Example
Private Sub CommandButton1_Click()
CreateAustraliaPost "1139549554", 5, 3 ' This prints a "Standard Customer Barcode" (FCC 11)
End Sub ' at X=5cm,Y=3cm from the top-left corner of the barcode
Private Sub CreateAustraliaPost(data As String, x As Integer, y As Integer)
Dim doc As Document
Set doc = Word.ActiveDocument
Dim shp As Shape
On Error Resume Next ' If we already have a barcode placed on the page, delete it first
Set shp = doc.Shapes("auspost_barcode")
shp.Delete
On Error GoTo 0
Dim ss As StrokeScribeClass
Set ss = CreateObject("STROKESCRIBE.StrokeScribeClass.1")
ss.Alphabet = AUSPOST
ss.Text = data
ss.HBorderSize = 0 ' The ActiveX will not add quiet zones into the image - this simplifies the barcode density calculations
ss.VBorderPercent = 0
pict_file = Environ("TEMP") & "\bar.emf" ' Because the native Office shapes do not support direct memory streaming,
' we prepare a temporary file for the barcode image
Dim FCC As String ' We can determine the required image width by querying the FCC code stored in the source data
FCC = Left$(data, 2)
Select Case FCC
Case "11", "45" ' The "Standard Customer Barcode" and "Reply Paid Barcode" contain 37 bars
w = 36.5 ' and must have the width of 36.5mm to maintain the bar/gap width of 0.5mm
Case "59"
w = 51.5
Case "62"
w = 66.5
Case Else ' Do not try to process other barcode types - the ActiveX does not support them
MsgBox "The ActiveX does not support this FCC"
Exit Sub
End Select
rc = ss.SavePicture(pict_file, EMF, w, 5 ) ' The image width is pre-calculated based on the FCC code. The barcode height is always 5mm
If rc > 0 Then
MsgBox ss.ErrorDescription
Exit Sub
End If
' Loading the barcode image stored in the temporary file back into Word
Set shp = doc.Shapes.AddPicture(pict_file, False, True, CentimetersToPoints(x), CentimetersToPoints(y))
shp.Name = "auspost_barcode" ' The fixed shape name helps us to delete a previously created barcode when calling the Sub multiple times
Kill pict_file ' We don't need the temporary file anymore
End Sub
You need to add a reference to the StrokeScribe Class into your VBA project to run this code.
A Note on the Customer Barcodes 2/3
The Customer Barcode 2 (FCC 59) and Customer Barcode 3 (FCC 62) contain a free format field that allow customers to put any information they want into the barcode. Australia Post recommends to use the ‘C’ or ‘N’ Encoding Tables (see below) but customers can use their own techniques.

The StrokeScribe encoder does not post-process the free format field and expects the data will contain only digits in the range of [0..3] (0 means a full bar, 1 means an Ascender bar, 2 means a Descender bar, 3 means a Tracker bar)
As an example, let's encode the following data in a Customer Barcode 3:
FCC | Sorting Code Field | Customer Information Field |
---|---|---|
62 | 19563573 | 01300112020131020301 |
To create the barcode, pass the following text string to the StrokeScribe barcode generator:
CreateAustraliaPost "621956357301300112020131020301", 5, 3
To test the Customer Barcode 2:
CreateAustraliaPost "59564391110000010000033223", 5, 3
The ‘C’ Encoding Table
Character | Bar Value |
---|---|
A | 000 |
B | 001 |
C | 002 |
D | 010 |
E | 011 |
F | 012 |
G | 020 |
H | 021 |
I | 022 |
J | 100 |
K | 101 |
L | 102 |
M | 110 |
N | 111 |
O | 112 |
P | 120 |
Q | 121 |
R | 122 |
S | 200 |
T | 201 |
U | 202 |
V | 210 |
W | 211 |
X | 212 |
Y | 220 |
Z | 221 |
Character | Bar Value |
---|---|
a | 023 |
b | 030 |
c | 031 |
d | 032 |
e | 033 |
f | 103 |
g | 113 |
h | 123 |
i | 130 |
j | 131 |
k | 132 |
l | 133 |
m | 203 |
n | 213 |
o | 223 |
p | 230 |
q | 231 |
r | 232 |
s | 233 |
t | 303 |
u | 313 |
v | 323 |
w | 330 |
x | 331 |
y | 332 |
z | 333 |
Character | Bar Value |
---|---|
0 | 222 |
1 | 300 |
2 | 301 |
3 | 302 |
4 | 310 |
5 | 311 |
6 | 312 |
7 | 320 |
8 | 321 |
9 | 322 |
Space | 003 |
# | 013 |
For example, to encode the text "ABC", pass the "000001002" to the barcode generator.
The ‘N’ Encoding Table
Number | Bar Value |
---|---|
0 | 00 |
1 | 01 |
2 | 02 |
3 | 10 |
4 | 11 |
5 | 12 |
6 | 20 |
7 | 21 |
8 | 22 |
9 | 30 |