jlhoover3
Board Regular
- Joined
- Nov 9, 2015
- Messages
- 60
- Office Version
- 365
- Platform
- Windows
Good Morning All,
I have been using VBA to print labels for quite some time now and everything is working correctly. However, DYMO in the recent years has upgraded to new printers with a new software, and I'm having a very hard time referencing the new DYMO Software. The current software version that I use for our program is v.8.7.3 and the new version they have is DYMO Connect for Desktop Windows v1.4.5. The problem is the new label printers require the new software, and in the future I will need to replace these printers. You can see below, the code I currently use to print off our folder labels. Any help would be much appreciated and thanks for your time!
I have been using VBA to print labels for quite some time now and everything is working correctly. However, DYMO in the recent years has upgraded to new printers with a new software, and I'm having a very hard time referencing the new DYMO Software. The current software version that I use for our program is v.8.7.3 and the new version they have is DYMO Connect for Desktop Windows v1.4.5. The problem is the new label printers require the new software, and in the future I will need to replace these printers. You can see below, the code I currently use to print off our folder labels. Any help would be much appreciated and thanks for your time!
VBA Code:
'CREATE DYMO FOLDER LABEL
Answer = MsgBox("Would you like to create a DYMO Folder Label?", vbQuestion + vbYesNo + vbDefaultButton1, "DYMO Folder Label")
If Answer = vbYes Then
Set myDymo = New DYMO_DLS_SDK.DymoHighLevelSDK
Set dyAddin = myDymo.DymoAddin
Set dyLabel = myDymo.DymoLabels
DymoPrinters() = Split(dyAddin.GetDymoPrinters, "|")
For PrinterId = LBound(DymoPrinters) To UBound(DymoPrinters)
PrinterName = DymoPrinters(PrinterId)
If PrinterName = "\\CONF-ROOM-PC\DYMO LabelWriter 450" Or PrinterName = "\\CONF-ROOM-PC\DYMO LabelWriter 450" Or PrinterName = "DYMO LabelWriter 450" Then
dyAddin.SelectPrinter DymoPrinters(PrinterId)
dyAddin.Open "\\SBS\Shared Folders\OCI\2022 OCI Operation Programs\Databases\Dymo Labels\File Label"
dyLabel.SetField "Text", Sheets("WIZARD").Range("OCI_JOB").Value
dyLabel.SetField "Text_1", Sheets("WIZARD").Range("OCI_VERIFIED_NUMBER").Value
dyLabel.SetField "Text_2", Sheets("WIZARD").Range("OCI_MARKFOR_COMPANY").Value & vbCrLf & Sheets("WIZARD").Range("OCI_MARKFOR_ADDRESS").Value & vbCrLf & Sheets("WIZARD").Range("OCI_MARKFOR_CITYSTATEZIP").Value
dyLabel.SetField "Text_3", "OCI"
dyAddin.Print2 1, True, 1
End If
Next
Set myDymo = Nothing
End If