How can I insert a barcode in an MS Word 97/2000 document using a "Macro".
I have a macro like the one I have started on writing below. I am trying to write a bar code into a word doc by using a font and size change. Nothing seems to be working. I can have barcoding font called "True Font" installed on my machine.
Any help out there!!!
Thanks,
Sub BarCode_Writer()
'
' BarCode_Writer Macro
' Macro created 11/13/2001 by mitikavumam
'
ActiveDocument.Select
' possibility 1
'Select and copy the text to the clipboard
ActiveDocument.Bookmarks("\page").Select
'Set the font size
'Selection.Font.Size = txtSize.Text
'Set the font weight etc.
'Selection.Font.Bold = IIf(chkBold.Value = 1, True, False)
'Selection.Font.Italic = IIf(chkItalic.Value = 1, True, False)
'Selection.Font.Underline = IIf(chkUnderline.Value = 1, True, False)
'Set the alignment
'Selection.ParagraphFormat.Alignment = drpJustification.ListIndex ' (combo)
'Type the text
'Selection.TypeText txtTypeText.Text
Selection.InsertAfter vbCr & "PPP" & i & vbCr
'Select and copy the text to the clipboard
'ActiveDocument.Bookmarks("\page").Range.Copy
'App.ActiveDocument.Bookmarks("\StartOfDoc").Range.Copy
' possibility 2
' Position at top of original document
ActiveDocument.Content.Select
Selection.HomeKey Unit:=wdStory
' Append page marker to end of cover page
'TextDocWindow.Activate
'ActiveDocument.Content.Select
'Selection.EndKey Unit:=wdStory
'Selection.InsertAfter vbCr & "PPP" & i & vbCr
'Set the font size
' Selection.Font.Size = txtSize.Text - error
'- error by all three so rem out for now
'Set the font weight etc.
'Selection.Font.Bold = IIf(chkBold.Value = 1, True, False)
'Selection.Font.Italic = IIf(chkItalic.Value = 1, True, False)
'Selection.Font.Underline = IIf(chkUnderline.Value = 1, True, False)
End Sub
I have a macro like the one I have started on writing below. I am trying to write a bar code into a word doc by using a font and size change. Nothing seems to be working. I can have barcoding font called "True Font" installed on my machine.
Any help out there!!!
Thanks,
Sub BarCode_Writer()
'
' BarCode_Writer Macro
' Macro created 11/13/2001 by mitikavumam
'
ActiveDocument.Select
' possibility 1
'Select and copy the text to the clipboard
ActiveDocument.Bookmarks("\page").Select
'Set the font size
'Selection.Font.Size = txtSize.Text
'Set the font weight etc.
'Selection.Font.Bold = IIf(chkBold.Value = 1, True, False)
'Selection.Font.Italic = IIf(chkItalic.Value = 1, True, False)
'Selection.Font.Underline = IIf(chkUnderline.Value = 1, True, False)
'Set the alignment
'Selection.ParagraphFormat.Alignment = drpJustification.ListIndex ' (combo)
'Type the text
'Selection.TypeText txtTypeText.Text
Selection.InsertAfter vbCr & "PPP" & i & vbCr
'Select and copy the text to the clipboard
'ActiveDocument.Bookmarks("\page").Range.Copy
'App.ActiveDocument.Bookmarks("\StartOfDoc").Range.Copy
' possibility 2
' Position at top of original document
ActiveDocument.Content.Select
Selection.HomeKey Unit:=wdStory
' Append page marker to end of cover page
'TextDocWindow.Activate
'ActiveDocument.Content.Select
'Selection.EndKey Unit:=wdStory
'Selection.InsertAfter vbCr & "PPP" & i & vbCr
'Set the font size
' Selection.Font.Size = txtSize.Text - error
'- error by all three so rem out for now
'Set the font weight etc.
'Selection.Font.Bold = IIf(chkBold.Value = 1, True, False)
'Selection.Font.Italic = IIf(chkItalic.Value = 1, True, False)
'Selection.Font.Underline = IIf(chkUnderline.Value = 1, True, False)
End Sub