当通过VBA使用DDE通道时,错误号为4599

时间:2017-02-14 20:55:56

标签: vba

我有一段代码,我过去曾经多次使用过。我现在正在另一台有更新办公室版本的计算机上试用它。当我运行代码" ddeapp.DDEExecute pChan,命令"我得到错误运行时错误4599:其他应用程序中的进程失败。在这种情况下

command =  "wait system; send """ & sendString & """; wait system;"
pChan = 1 (which is the channel number)
ddeapp = instance of MS Word

代码是

Private Sub pExec(command)
On Error Resume Next
If pChan <> -1 Then
  ddeapp.DDEExecute pChan, command
  If Err.Number <> 0 Then
    On Error GoTo 0
    pCommError
  End If
End If
End Sub

有关如何解决此问题的任何建议吗?

0 个答案:

没有答案