Hi, all

i have a font problem with a word doc :

VB Code:
  1. Dim WordObj As Word.Application
  2. Dim WordDoc As Word.Document
  3. Dim WordRange As Word.Range
  4. Dim WordTable As Word.Table
  5. Dim WordColumn As Word.Column
  6. Dim WordRow As Word.Row
  7.  
  8. Private Sub Command1_Click()
  9.  
  10. Set WordObj = Nothing
  11. Set WordObj = CreateObject("Word.Application")
  12. Set WordDoc = WordObj.Documents.Add(DocumentType:=wdNewBlankDocument)   'Open the document
  13. Set WordRange = WordDoc.Range(Start:=0, End:=0)
  14. WordObj.Visible = True
  15.  
  16. With WordRange
  17.     '.Font.Name = "Code 128"
  18.     '.Font.Size = 16
  19.     .InsertParagraphAfter
  20.     .InsertParagraphAfter
  21.     .SetRange Start:=WordRange.End, _
  22.         End:=WordRange.End
  23. End With
  24.  
  25. WordDoc.Range(Start:=0, End:=0).Bold = True
  26. Set WordTable = WordDoc.Tables.Add(WordDoc.Paragraphs.Item(2).Range, 1, 2, wdWord9TableBehavior, wdAutoFitFixed)
  27. Set WordRow = WordTable.Rows.Add(BeforeRow:=WordTable.Rows(1))
  28. Selection.GoTo What:=wdGoToTable, Which:=wdGoToNext
  29. WordDoc.Tables(1).Cell(1, 1).Select
  30. WordRange = Selection.Range
  31.  
  32. ' Adds info to cells
  33.  With WordObj
  34.         ' Prints BC1
  35.         '.ActiveWindow.Selection.Font.Size = 20
  36.         WordRange.Font.Name = "Code 128"
  37.         WordRange.Text = "34324324324332"
  38.         WordRange.Move Unit:=wdCell
  39.        
  40.         WordRange.Font.Name = "Code 128"
  41.         WordRange.Text = "34324324324332"
  42.         WordRange.Move Unit:=wdCell
  43.         'WordTable.Rows.Add BeforeRow:=WordTable.Rows(1)
  44.     End With
  45.        
  46. WordObj.ActiveDocument.SaveAs "C:\BarCode.doc"
  47. End Sub

when run it creates the word doc, saves it all fine but it doesnt print out in "Code 128" Font, Ive installed it in the font folder, and if i open word app manually and use it it prints fine, but when i run the code it just prints out in "New Roman" or something

ive looked around msdn and google but nothing really
would anyone know why the font wont shift to code 128?

Thanks