0

目前我在 Excel 中有一个过程,用户单击特定命令,然后从 Excel 中获取数据并在 Word 中创建邮件合并。然后,我希望通过 RightFax 将其发送到文件,但在 Set oNewFax 时遇到问题,在单步执行时出现运行时错误“-2147023174 (800706ba)”:。任何帮助是极大的赞赏!

    Sub RightFax()

Dim oFaxServer As RFCOMAPILib.faxserver
Dim oNewFax As RFCOMAPILib.fax
Set oFaxServer = New RFCOMAPILib.faxserver
oFaxServer.ServerName = "RightFax Fax Printer"
oFaxServer.UseNTAuthentication = True
Set oNewFax = oFaxServer.User.Faxes.Create

oNewFax.ToFaxNumber = "##########"
oNewFax.ToName = "Testing"
oNewFax.EmailSubject = ""
oNewFax.Attachments.Add ("######")
oNewFax.HasCoversheet = False 'Change to true if you want a coversheet 
generated
oNewFax.Send
Set oFaxServer = Nothing
Set oNewFax = Nothing

End Sub
4

1 回答 1

0

我的工作代码创建传真对象,如下所示...

Set oNewFax = oFaxServer.CreateObject(coFax)
于 2018-11-05T21:30:18.723 回答