Issue 5948 - Envelope addressing does not print barcodes (postnet zip-codes)
Summary: Envelope addressing does not print barcodes (postnet zip-codes)
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 1.0.0
Hardware: All All
: P5 (lowest) Trivial with 44 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: ms_interoperability, needhelp
: 7079 11619 12449 16357 23587 66435 83694 91785 116083 (view as issue list)
Depends on:
Reported: 2002-06-18 14:20 UTC by Unknown
Modified: 2017-05-20 11:20 UTC (History)
8 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

M$ Word document demonstrating desired postal barcode feature (52.00 KB, application/msword)
2003-06-16 19:39 UTC, Unknown
no flags Details
No barcode-option in my WORD2000 (15.40 KB, image/png)
2003-06-24 07:50 UTC, Rainer Bielefeld
no flags Details
AutoText file - put it into <oodir>/user/autotext (24.43 KB, application/octet-stream)
2004-09-11 20:53 UTC, lohmaier
no flags Details
simplistic macro, queries for the digits to convert to postnetbarcode (1.34 KB, text/plain)
2004-09-11 21:00 UTC, lohmaier
no flags Details
macro that parses the address located in a textframe to generate postnet barcode (6.39 KB, text/txt)
2004-09-13 01:48 UTC, lohmaier
no flags Details
Uno-Package that can be installed using Tools|Package Manager (19.45 KB, application/x-compressed)
2005-07-19 21:23 UTC, lohmaier
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2002-06-18 14:20:22 UTC
Clients who compose and send mail via Office require barcode printing for 
envelope addressing, a feature that exists in M$ Word, in order to make the 
switch to OpenOffice.
Comment 1 stx123 2002-11-04 21:37:51 UTC
change subcomponent to IssueZilla (uppercase 'Z')
Comment 2 brant 2002-11-06 15:03:06 UTC
Shouldn't this be in word processor or some similar component, not www.
Comment 3 stx123 2002-11-06 16:25:27 UTC
changing component to wordprocessor and reassign issue to owner of
selected subcomponent.
Comment 4 stefan.baltzer 2003-06-04 14:21:45 UTC
Reassigned to Bettina.
Comment 5 Rainer Bielefeld 2003-06-10 08:41:34 UTC
Hi Reporter,

can you give some more specific hints to your needs as
- which client do you use
- how is the barcode that should be printed generated
- which special WORD- function do you use until now?
A Word-document (for the envelope) might be helpful, maybe OOo will
decide to take over the WORD-Functionality 1:1

Rainer Bielefeld
Comment 6 Unknown 2003-06-16 19:39:58 UTC
Created attachment 6924 [details]
M$ Word document demonstrating desired postal barcode feature
Comment 7 Unknown 2003-06-16 19:44:10 UTC
>> can you give some more specific hints to your needs as
- which client do you use<<

M$ Word 2000 (I find XP too unstable and the UI too hateful)

>> - how is the barcode that should be printed generated <<
>> which special WORD- function do you use until now? <<

Are these the same question?  Perhaps I don't understand.  In M$ Word
you access the feature as follows:

"Tools", "Envelopes and Labels...", "Options", "Delivery point
barcode" checkbox

In OpenOffice this would appear in the similar user interface accessed
by "Insert", "Envelopes"

>>A Word-document (for the envelope) might be helpful, maybe OOo will
decide to take over the WORD-Functionality 1:1<<

Attached to the project, "envbarcode.doc"

Comment 8 prgmgr 2003-06-23 20:55:45 UTC
*** Issue 11619 has been marked as a duplicate of this issue. ***
Comment 9 Rainer Bielefeld 2003-06-24 07:46:23 UTC
I tried my german WORD2000 and can not find such barcode-option, but
my WORD-HELP has some hints concerning barcode (only US-version?).
Nevertheless I see that that might be a fine enhancement, and so -->
NEW, P5.

For my understanding:
Does your WORD create the barcode or are the barcodes supplied by
another tool (if other tool - which one?)

I can not do any further work here because I have no possibility for
further tests with WORD.

Comment 10 Rainer Bielefeld 2003-06-24 07:50:32 UTC
Created attachment 7084 [details]
No barcode-option in my WORD2000
Comment 11 Rainer Bielefeld 2003-07-01 08:22:48 UTC
*** Issue 7079 has been marked as a duplicate of this issue. ***
Comment 12 Unknown 2003-07-11 00:21:06 UTC
Word 97 also has the same functionality, in the "options" tab of the envelope  
widget.  The bar codes are generated directly by Word, and appear in the preview  
immediately.  No external program is needed.  Information on the bar codes can  
be found at:  
(web address->bar code calculator)  
(bar code fonts)   
(description)  (see pp 42-44)  
Comment 13 Unknown 2003-07-12 20:12:43 UTC
Here's another web-based barcode generator, which doesn't require
printing to see the codes, but which seems to put spaces between the
segments to better illustrate.  I don't think the spaces should be
present on the printed envelope.
Comment 14 malte_timmermann 2003-07-15 11:50:57 UTC
Removed keyword accessibility
Comment 15 okapi1253 2003-10-27 04:04:38 UTC
Can this be targeted for 2.0? Also platform / OS should be changed to all.
Comment 16 lsacher 2004-02-06 19:21:24 UTC
I would also like to see two options added to the Open Office 
Insert / Envelope options. I'm not sure is there was some confusion,
but I believe this appears only in the US versions of MS Word.

Both of these options are well used by US businesses.

1) An option to use US ZIP code Barcodes with the Addressee.  
   MS Word refers tothis as "Delivery Point Barcode"

2) An option to use the US postal courtesy reply barcode on the envelope.  
   MS Wordrefers to this option as "FIM-A Courtesy Reply Mail"

MS Word2000 US version:
  Tools / Envelopes and Labels... / Options [button] 
    If mailed in the USA
     - Delivery Point Barcode
     - FIM-A Courtesy Reply Mail

Larry Sacherich
Comment 17 lsacher 2004-02-06 19:26:42 UTC
*** Issue 23587 has been marked as a duplicate of this issue. ***
Comment 18 lohmaier 2004-04-27 18:27:57 UTC
*** Issue 12449 has been marked as a duplicate of this issue. ***
Comment 19 lohmaier 2004-04-27 18:29:29 UTC
extending summary to make it easier to find in a query.
Comment 20 fsk 2004-05-13 14:51:19 UTC
This is a fairly trivial issue - all you need to do is parse the delivery
address looking for the zipcode, and then use a barcode font to display it on a
line above/below the address.

I am interested in contributing to the project. I wrote the address matcher in
the link listed in David Fenyes comment:

Comment 21 lohmaier 2004-06-16 17:24:51 UTC
> [...] and then use a barcode font to display it on a line above/below the address.

That's the problem. OOo doesn't have a barcode font. And AFAIK there are no free
(redistributable) barcode fonts.
Thus a function that would just take the zipcode and format it with another font
would not help.

Otherwise the parsing and insertion of the newly formatted barcode could be
easiest achieved with a macro (as a workaround). I thik such a macro would be a
good thing to contribute.
Comment 22 marvinglenn 2004-08-25 10:45:31 UTC
Reference information for anyone tackling the task of adding this feature to OO:

The barcode is "POSTNET" format, and it well described and specified in a
publication for the US Postal Service, publication 25 chapter 4.  The link below
is an online version of that publication:
Comment 23 lohmaier 2004-09-11 20:52:18 UTC
Thank you for the link to the specification
I created a set of AutoTexts for the encoded digits.
It consists of grouped rectangles, so display on screen may not be the best due
to scaling, but printout should be fine.

To use/test it:
put the Postnet.bau into your <ooodir>/user/autotext directory and restart OOo

The shortcuts are "pf" for the frame bars and "p<digit>" for the numbers 0-9.
Insert the autotext using the shortcut followed by <F3>, e.g. type

Since it is annoying to type the barcode this way, I wrote a small macro that
reads the plain digits (141272237 from the example above) and does the rest for you.

Some questions:
Would it be sufficient to only encode the 5-digit zipcode and add the correction
Or is the nine-digit Zip+4 (+correction character) more common? 
Or even the Eleven-Digit Delivery Point Code?
Comment 24 lohmaier 2004-09-11 20:53:54 UTC
Created attachment 17659 [details]
AutoText file - put it into <oodir>/user/autotext
Comment 25 lohmaier 2004-09-11 21:00:31 UTC
Created attachment 17660 [details]
simplistic macro, queries for the digits to convert to postnetbarcode
Comment 26 jacooks 2004-09-11 22:03:41 UTC
I would say that for compatibility with MS Word, as well as to follow newer US
postal standards we would need the zip+4 barcode capability.  It would be nice
if we could follow the Universal Postal Union's standards for barcodes
( but I can't seem to find a copy of their standard (unless
you pay for them to send it to you).
Comment 27 lohmaier 2004-09-13 01:47:10 UTC
I wrote a more sophisticated macro that should work for most cases (hopefully)

* the AutoTexts uploaded earlier to insert the actual barcode
* The address must be located in a text frame named "addressee" (or "Empfänger" 
  for the german version of OOo)
  If you insert an Envelope using "Insert|Envelope..." OOo creates that frame for 
If, for some reason, you don't use the Insert|Envelope functionality you either
have to 
* rewrite the macro or
* create a textframe using Insert|Frame. In the "Options"-tab you will find the
"name" box. Enter "addressee" into that box.

Run the macro using "PostNetCode()"

Please report whether this macro gives correct results.
(The barcode is put before the address)
Comment 28 lohmaier 2004-09-13 01:48:13 UTC
Created attachment 17667 [details]
macro that parses the address located in a textframe to generate postnet barcode
Comment 29 jacooks 2004-09-20 01:39:11 UTC

I'm getting an error partway through the running of the macro.  It successfully
reads the barcode, but errors out with InsertPostnetCode portion, specifically
because of oAutoText = CreateUnoService("")

I have copied the autotext file and placed it in the correct directory.  Any
Comment 30 lohmaier 2004-09-23 17:49:53 UTC
>[macro throws error at oAutoText =

You need at least OOo 1.1.x to run this macro. So could you please test again
with OOo 1.1.2 or  with OOo 1.1.3rc?
Comment 31 jacooks 2004-09-24 13:18:01 UTC
Ahhh, sorry I tested it on 1.9.51 and 1.9.54, not 1.1.2 or 1.1.3rc.  I'll retest
it with a stable release shortly.
Comment 32 lohmaier 2004-10-09 19:46:10 UTC
hmm. I tested with 1.9m54 and it works (linux version)
AutoTexts placed in ~/.OpenOffice.org1.9.54/user/autotext, Macro loaded using
Tools|Macros-> Organize Macros -> Basic
expanded "My Macros" -> "Standard" -> "Module1", hit "Edit".
loaded the postnet_revised.bas using the "insert BASIC source" toolbar button,
save & close the macro window.

Then opened a new writer document, choose instert|envelope enter some address
and then run Tools|Macro -> Run Macro, choose "My Macros" -> "Standard" ->
"Module1" -> "PostNetCode" and hit "Run" -> Barcode gets inserted without error
Comment 33 jacooks 2004-10-11 00:51:57 UTC

Thanks for posting your detailed instructions.  I followed them exactly, and
still get the error at the autotext portion.  In the Windows release, the folder
autotext has a subfolder English.  I've tried placing your autotext file in both
folders, but I still get the error with 1.9.54.  I'm downloading 1.1.3 to test
on now.  The exact error is:

BASIC runtime error
An exception occurred
Message: .
Comment 34 andreschnabel 2004-10-14 18:35:16 UTC
cloph / jacooks:
The macro works fine for me(I even didn't read the detailed instructions, just
put Postnet.bau to the desired directories and copied the macrocode to a new
Anyway, I cannod verfiy if the barcodes are correct (as I'm German too).

TEsted with OOo 1.1.3 / OOo 1.9m54 on Windows XP (both are multiuser installs,
files copied to the user config dirs).
Comment 35 r4zoli 2004-10-14 20:08:23 UTC
I tested on Win XP Home Hungarian
1.9.56.(English) and failed during Messeage' could not determine delivey point'
and stopped on
	oPostnetGroup = oAutoText.getByName("Postnet"). if I changed the delivery point
detail, to the POSTNET found on page nearly same results I get. without messeage
but with debug messeage with correct recognition of zip number, delivery point
is a mess, and correction character is on. 

1.1.2 (Hungarian) is failed, but I think in it changed frame name from 'adresse'
to 'címzett' and this caused the problem. 
1.1.3 (English)stopped same way but in point 
 	oPostnetEntry = oPostnetGroup.getByName("pf")
and in a messeage delivery pont is get from zip code above row second an third

Comment 36 r4zoli 2004-10-14 20:47:01 UTC
I tested on SuSe Linux 9.0 
1.1.2 Hungarian (I solved my mistake in it put the frame name) results same as  
in  1.9.56. English 
and the results: stopped at point
	oPostnetEntry = oPostnetGroup.getByName("pf")
101 Street
ANYWHWRE US 12345-6789

Comment 37 lohmaier 2004-10-14 20:47:47 UTC
you can change the value of the variable "nameOfFrame" to "címzett" to make it
work with the hungarian version (you can as well rename the frame to "Addressee")

The "could not determine delivey point" message is not an error (just a
debug/informative message).

The execution stops because the needed autoTexts are not available. You need to
copy the attached "Postnet.bau" to you autotext folder.
Check whether the autotext works by typing "p0<F3>" or "p1<F3>" and "pf<F3>"
Comment 38 lohmaier 2005-01-25 18:04:21 UTC
C.S. Morris: A message to your email account at bounced. I will
*not* send an unblock message. I regard this way of "fighting spam" nonsense. If
you let my messages bounce, you don't get my mail.<period>

sorry for this OT message.
Comment 39 jacooks 2005-02-14 20:20:22 UTC

Re-ran this with OOo 1.1.4.  Worked fine, not sure what I was doing wrong the
first time but I'll chalk it up to not inserting the autotext right the first
time.  Anyway, this worked fine with both Zip and Zip+4.  I compared against MS
Word 2003 and their barcode, and visually the barcode matches perfectly.  I'll
test this with a barcode scanner within the next day or so and just verify its
perfectly readable.  Thanks for all your work on this.
Comment 40 jacooks 2005-02-15 18:08:58 UTC
Barcodes look good printed and seem to match (my barcode reader has problems
reading postal barcodes).  I also tested this under Windows XP (SP2) with 1.9.77
and it worked flawlessly.  I think its good to go.
Comment 41 lohmaier 2005-04-20 18:22:33 UTC
*** Issue 16357 has been marked as a duplicate of this issue. ***
Comment 42 lohmaier 2005-07-19 21:23:33 UTC
Created attachment 28049 [details]
Uno-Package that can be installed using Tools|Package Manager
Comment 43 lohmaier 2005-07-19 21:30:05 UTC
I attached a backage that is meant to be installed unsing the package manager.
It will install a menu-entry under "Tools|Addons" and registers an entry in the
Help-Menu. It will install the autotext-file and the macros.

After adding it using the package manager you can use it without restarting the
Office (you only have to open a new document to see the menu-items)

The Help-document currently is only a placeholder.
Comment 44 lars.nooden 2006-03-17 19:26:40 UTC
The USPS page on Postnet barcodes is here:
Comment 45 lohmaier 2006-06-15 23:11:31 UTC
*** Issue 66435 has been marked as a duplicate of this issue. ***
Comment 46 amessina 2007-03-10 22:04:30 UTC
I have been using the PostNetCode0.6 from cloph sucessfully for a while now. 
However, I just tried to use it on a fresh intsall of OO on FC6
(, and received the following error:

"Path already added - We should never rech this point. Please contact the author!"

Is there an update on this feature being included in OO?
Comment 47 bettina.haberer 2007-09-26 16:01:27 UTC
Hi Mathias, I have changed the current owner to your owner. Please take the
ownership of these enhancements.
Comment 48 michael.ruess 2007-11-16 13:05:05 UTC
*** Issue 83694 has been marked as a duplicate of this issue. ***
Comment 49 jcuccia 2007-11-23 22:14:58 UTC
The US Delivery Point Barcodes are being replaced by the Intelligent Mail 
Barcode.  Fonts and code libraries for implementation are available from the US 
Postal Service at

I would really like to see this feature added to the suite.  

Thank you.
Comment 50 amessina 2007-12-22 15:26:20 UTC
Any updates here?  Would a dev be able to reassign the "Version" and 
the "Milestone".
Comment 51 spurred_on 2008-06-07 16:34:14 UTC
This issue has been discussed since June of 2002 when OOo 1.0 was new. It is now
June of 2008, and I am using OOo 3.0 beta. It is hard to believe that there is
still no inclusion of this feature. At present my work-around is to print all of
my envelopes using WordPerfect, which, like MS Word, has this feature and has
had this feature for years. Not a way to win converts to OOo.

The U.S. Postal Service (USPS) site that jcuccia linked to above states that the
new "Intelligent Mail® barcode technology, among other things, combines the
capabilities of the POSTNET barcode and the Planet Code® barcode into one unique
barcode." The term "Planet Code" hints that the rest of the world may soon adopt
to using the barcode system for automated mail sorting, making the need for the
inclusion of this feature in OOo a world wide requirement.

As some U.S. States, such as Massachusetts, now require all governmental and
judicial documents to be in Open Document format, it would seem that OOo is
poised to become the document writer of choice for government bureaucracies and
the legal profession, and yet OOo still lacks this envelope addressing feature.
Having worked in law offices for years, I know that law offices address a lot of
envelopes daily. There is a need for this barcode feature in a word processor to
be used in office environments. As fsk pointed out years ago, the feature does
not seem so complex in concept. Is anyone working on this request?
Comment 52 lars.nooden 2008-06-07 17:28:58 UTC
Here is the new link for the POSTNET specification, the old link above has expired:
Comment 53 spurred_on 2008-06-07 20:07:51 UTC
It seems some have felt my post above was rude. In response to that I've quoted
below my post in another forum relating to the same issue.

"The fact that the issue has been unresolved in six years was not a dig at
developers, but a comment on the unimportance that the issue has been deemed . . .

"Both MS Word and WordPerfect have had this feature for many years. OOo is a
very viable alternative to these two programs. Businesses are now looking at
Linux as a cost efficient alternative to Windows and OOo as a cost efficient
alternative to MS Word. This missing feature is holding businesses back from
embracing OOo. I'd like to see that change, and making this feature available
could make that difference."

I apologize to any who took offense. I am trying to kindle interest in this
issue, not rant at developers.

Comment 54 michael.ruess 2008-07-18 07:18:23 UTC
*** Issue 91785 has been marked as a duplicate of this issue. ***
Comment 55 lohmaier 2009-10-07 13:42:13 UTC
I kind of lost track of this issue.

Just a small remark as stated before, I'm not a U.S. citicen, thus I (and noone
I know from my personal surroundings) can make use of such an extension. All I
know about the barcodes is from the linked documents (thanks for those)

Of course everyone is free to take the code from the extension and extend it. It
merely was meant as a demonstration on how it might be done. The solution with
the autotext-drawings was a quick way to do it. If I'd do it again now, I'd very
likely use some java barcode library to create a png instead of inserting the

As for the intelli mail codes: Those might be easier to use, as there are
already some samples around. I cannot make any promise, since I didn't loot at
it yet....
Comment 56 eric.savary 2010-12-13 01:22:13 UTC
*** Issue 116083 has been marked as a duplicate of this issue. ***
Comment 57 jacaboo 2013-07-26 07:15:16 UTC
i have several years' experience in generating barcode, i think some turioals and articles might be helpful. you can google Postnet Barcode, and some articles can be available. i can give you some if you need . this is the turoial of generating Postnet Barcode , you can ,make it as reference and the tool if free for 30 days.this is the barcode generator in c# and other formats, i think it might also be helpful
good luck.
Comment 58 Marcus 2017-05-20 11:20:00 UTC
Reset assigne to the default "".