您的位置:首页 > 编程语言

以编程方式创建次线程

2009-09-07 10:27 190 查看
Public Sub setBarcode(code As String)
ThisDocument.Sections(1).Range.Tables(1).Select '条形码位置
If Selection.InlineShapes.Count = 1 Then
ThisDocument.Sections(1).Range.Tables(1).Select
Selection.InlineShapes(1).Delete
End If
Set ab = Selection.InlineShapes.AddOLEObject(ClassType:="BARCODE.BarcodeCtrl.1", FileName:="", LinkToFile:=False, DisplayAsIcon:=False)
With ab.OLEFormat
.Activate
Set abObject = .Object
End With

abObject.Style = 7 '条码类型,C-39码
abObject.LineWeight = 3
abObject.Value = code '要打印的字符
'abObject.ShowData = 0
ab.Width = 240
ab.Height = 50
End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: