Question
12400 views

Is there a way to use the barcode font in Word so that it is formatted in a way that the scanner will recognize it?

EzekielBarbirolli asked on
Original Title: Printing Barcodes
Hello Everyone: I need to print barcodes of a 6 digit ID number, to be read by a scanner. I am using the Free 3 of 9 font, installed on Windows/XP, with MS/Word 2007 - I am printing in the format *123456*, and I have turned off the *Bold/Autoformat option. If I create a barcode in MS/Word, the scanner does not recognize it; if I create the same barcode in Notepad, the scanner will read the the barcode successfully.

Is there a way to use the barcode font in Word so that it is formatted in a way that the scanner will recognize it?

Thanks. . .
2 people had this question

Abuse history


The answered status icon Answer
macropod replied on

Simpler than using a macro, would be to embed a FILLIN field within the QUOTE field, thus:

{QUOTE "*{FILLIN "What is the barcode ID?"}*" \* Charformat}
Now, whenever you want to update the barcode, simply select it and press F9 - you'll get a prompt for an update, with the current value displayed.

Since you're using Word 2007, you could add the field to a custom Quick Part named, say, Barcode. Then, whenever you want to insert a barcode, insert the Barcode Quick Part and press F9.

The only potential drawback I see with this, but it could also be seen as a benefit, is that anything that causes fields in the body of the document to update (eg Ctrl-A then F9, or printing with the 'update fields' option checked) will trigger the FILLIN field.

As to a macro solution, you could use something like:

Sub InsertBarcode()
Dim StrCode As String
StrCode = Trim(InputBox("What is the barcode ID?", "Barcode Insertion"))
If StrCode = "" Then Exit Sub
With Selection
  .Collapse wdCollapseStart
  .Text = "*" & StrCode & "*"
  .Font.Name = "3of9"
  '.Font.Size = 24
End With
End Sub

With the macro, you'll need to add the actual font name and, possibly, specify an appropriate point size (there's a commented-out line in the code that shows how to do that). to use the macro, you'd need to add it to whatever template the document is based on (eg Normal.dot). For instructions on installing macros, see: http://www.gmayor.com/installing_macro.htm

Cheers,
Paul Edstein
[MS MVP - Word]
1 person found this helpful

Abuse history


progress