creating barcode

B

bryan

I have a template that when creating a new document I would like to
automatically create a barcode at the bottom of the document based upon
information in a text field.

Is this possible and if so, ideas?

Thanks,
Bryan
 
J

Jay Freedman

bryan said:
I have a template that when creating a new document I would like to
automatically create a barcode at the bottom of the document based
upon information in a text field.

Is this possible and if so, ideas?

Thanks,
Bryan

First task is to decide what kind of barcode you need -- there are dozens.
Find out what kind of code the reader hardware can accept.

Assuming it's something fairly common such as Code 3 of 9, you should be
able to locate a font that displays text as the corresponding bars. Beware
of low-quality fonts, though; you may be better served by an external
program that creates the bar code as a graphic file that you can insert in
the document.

A good starting place is the BarCode1 site,
http://www.adams1.com/pub/russadam/share.html.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
B

bryan

I have downloaded the 3of9 barcode previously.
Need to be able to create the barcode on the document as it will contain
pertinent information that is on the document.

Assuming I have a textfield (Text54) near the bottom of the document, how do
I get that field to be 3of9 font and take info from text3 field to get my
barcode and then change font back to what I had before.

Thanks,
Bryan
 
G

Graham Mayor

Instead of the formfield Text54 insert a REF field eg

{REF Text3 \*Charformat}

add an exclamation mark at each end

!{REF Text3 \*Charformat}!

and format the lot with the 3of9 Barcode Font.

Set the Calculate on Exit property of Text3 and when you tab out of that
field the data you enter will form the body of the barcode. The charformat
switch ensures that the REF field result is formatted with the barcode font.

Don't apply the barcode font until you have inserted the field or you won't
be able to see what you are doing.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
B

bryan

What do you mean by 'format the lot with the 3of9 Barcode Font' ?
I'm assuming you mean the spot on the template where the barcode is placed.

I understand the ! on both ends is to hide the '*' in the barcode but, in
the ref do I not need the asterik on both ends to distinguish as a barcode?

Also,
What if I want 2 fields (text3 and text4) to make up the barcode, Can back
to back ref fields be used to make one barcode?

Appreciate the help,
Bryan
 
B

bryan

I should have asked all my questions after testing this.

When I ctrl+F9 for this should I ctrl+F9 again so that the '!' is inside?
I get an error on this, if I have them outside the ctrl+F9 they show up as
exclamation marks.

After I ctrl+F9 and enter the ref I highlight the whole field and set the
font, correct?

Shouldn't the value of the barcode show below the barcode?

Thanks,
Bryan
 
G

Graham Mayor

Let's start by saying that until this question I knew nothing of the 3of9
barcode font beyond what I read about it on the web site from which the
sample was downloaded, and very little about bar code formats generally.
What do you mean by 'format the lot with the 3of9 Barcode Font' ?
I'm assuming you mean the spot on the template where the barcode is
placed.

Yes format the field and the exclamation marks (which the web site indicates
are used in place of asterisks in Word)
I understand the ! on both ends is to hide the '*' in the barcode
but, in the ref do I not need the asterik on both ends to distinguish
as a barcode?

Apparently the exclamation marks are used in place of the asterisks, though
having retested it appears you can use either asterisk or exclamation mark
to the same effect.
Also,
What if I want 2 fields (text3 and text4) to make up the barcode, Can
back to back ref fields be used to make one barcode?

Yes you can use the content of two or more fields or one or more fields with
fixed text. Whatever you format with the barcode font will appear as a
barcode.
 
G

Graham Mayor

bryan said:
I should have asked all my questions after testing this.

When I ctrl+F9 for this should I ctrl+F9 again so that the '!' is
inside? I get an error on this, if I have them outside the ctrl+F9
they show up as exclamation marks.

No the field brackets go inside the excvlamation marks, exactly as I posted
it.
After I ctrl+F9 and enter the ref I highlight the whole field and set
the font, correct?

Correct - when you lock the form the barcode font at the field location will
simply show the start and end asterisks. If you don't want to show that you
would need to conditionally insert the line, but let's not get ahead of
ourselves ;)
Shouldn't the value of the barcode show below the barcode?

It does! Maybe you need a larger font size?
Thanks,
Bryan

You are welcome :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top