• July 17, 2017
    Announcement: New site design for Microsoft Community

    In July, Microsoft will roll out the first of ongoing site improvements aimed to modernize Microsoft Community and help customers get the most out of their community experience.

    • During the roll out period, you may see the old or new site design depending on your location

    • We expect the roll out to finish by 31 July

    Note: Past private message conversations will not move to the new site design. Please save any private messages you would like to keep.

     Learn more about the upcoming site improvements in this thread.

    Thank you for being part of Microsoft Community!


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. . .
4 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

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

Abuse history