level 1
mjabc1111
楼主
Sub Print_carton()
Dim file_path As String
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
file_path = "d:\aa.btw"
'----------------------------------------------------------------------
'Order bartender print lab as templet
'----------------------------------------------------------------------
Set btApp = CreateObject("BarTender.Application")
btApp.Visible = False
Set btFormat = btApp.Formats.Open(file_path)
'---------------------------------------------------------------------
' Assignment a value to variable.
'---------------------------------------------------------------------
btFormat.SetNamedSubStringValue "Var1", Cells(2, 1)
' Implement print
btFormat.PrintOut
btFormat.Close btDoNotSaveChanges
btApp.Quit
End Sub
2016年05月21日 11点05分
1
Dim file_path As String
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
file_path = "d:\aa.btw"
'----------------------------------------------------------------------
'Order bartender print lab as templet
'----------------------------------------------------------------------
Set btApp = CreateObject("BarTender.Application")
btApp.Visible = False
Set btFormat = btApp.Formats.Open(file_path)
'---------------------------------------------------------------------
' Assignment a value to variable.
'---------------------------------------------------------------------
btFormat.SetNamedSubStringValue "Var1", Cells(2, 1)
' Implement print
btFormat.PrintOut
btFormat.Close btDoNotSaveChanges
btApp.Quit
End Sub