Is anyone familiar with vbscript and com? (Brother has the sdk and I downloaded it but not familiar with either.
Code: Select all
' b-PAC 3.0 Component Sample (Instant Name Plate)
This is an example of creating a nameplate from vbs and I assume I'd have to load their dll first: "Interop.bpac.DLL"
' (C)Copyright Brother Industries, Ltd. 2009
'
'<SCRIPT LANGUAGE="VBScript">
' Data Folder
Const sDataFolder = "C:\Program Files\Brother bPAC3 SDK\Templates\"
DoPrint(sDataFolder & "NamePlate1.lbx")
'*******************************************************************
' Print Module
'*******************************************************************
Sub DoPrint(strFilePath)
Set ObjDoc = CreateObject("bpac.Document")
bRet = ObjDoc.Open(strFilePath)
If (bRet <> False) Then
ObjDoc.GetObject("objCompany").Text = "Brother Industries, Ltd."
ObjDoc.GetObject("objName").Text = "John Smith"
' ObjDoc.SetMediaByName ObjDoc.Printer.GetMediaName(), True
ObjDoc.StartPrint "", 0
ObjDoc.PrintOut 1, 0
ObjDoc.EndPrint
ObjDoc.Close
End If
Set ObjDoc = Nothing
End Sub