【问题标题】:Printing to Dymo LabelWriter 450 from Access VBA从 Access VBA 打印到 Dymo LabelWriter 450
【发布时间】:2020-10-27 19:44:07
【问题描述】:

我们最近升级了一些 PC,随后在用于对 MySQL 数据库执行操作的 Access 前端中遇到了 VBA 代码的一些问题。特定的代码从数据库中提取一个序列号,然后将其作为条形码打印到 Dymo Labelwriter 450。

Style = vbExclamation + vbYesNo
Title = "Print Label For  " & Me.txt_Barcode & "  ?"
Response = MsgBox("Do you want to print a label for serial number " & Me.txt_Barcode, Style, Title)
If Response = vbYes Then
Dim myDymo As Object
Dim myLabel As Object
'On Error Resume Next
Set myDymo = CreateObject("Dymo.DymoAddIn") '
Set myLabel = CreateObject("Dymo.DymoLabels")
If (myDymo Is Nothing) Or (myLabel Is Nothing) Then
MsgBox "Unable to create OLE objects"
Exit Sub
End If

代码现在在第 8 行中断,即

Set myDymo = CreateObject("Dymo.DymoAddIn") '

我得到的错误代码与 ActiveX 相关(这似乎可能与从 32 位到 64 位有关),但自从安装了 Dymo 的最新 DLS (DLS8Setup.8.2.2.996),它似乎已经演变成以下:

运行时错误'-2147467261 (80004003)

自动化错误 无效的指针

我希望有人能指出一个简单的修复方法,这样我就不必完全重新编写代码!

提前致谢!

【问题讨论】:

    标签: mysql vba ms-access dymo


    【解决方案1】:

    我设法通过几个步骤解决了这个问题,老实说,我不确定哪个完全解决了问题的这个特定部分:

    首先是运行 DYMO_Label_v.8_SDK_Installer

    我也从最新的 Dymo Connect 切换到 DYMO Label v.8

    然后我必须确保我们使用的 Barcode 字体是作为所有用户的管理员安装的,而不仅仅是特定的用户配置文件

    最后,我认为这可能是问题所在,该软件正在寻找一个名为“Serial.label”的标签模板,我在我们的服务器上找到该模板并将其复制并粘贴到该软件正在查找的 C: 驱动器中为它。

    我很高兴我不必重新编写代码!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-01-16
      • 2015-11-23
      • 2020-03-19
      • 2020-07-06
      • 2016-11-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多