0

Currently I have a process in Excel that a user clicks a specific command and then takes the data from Excel and creates a mailmerge in Word. I then want it to the file(s) via RightFax, but I am having trouble at the Set oNewFax, when stepping through I get a run-time error '-2147023174 (800706ba)':. Any help is greatly appreciated!

    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
braX
  • 11,506
  • 5
  • 20
  • 33
EvilMorty
  • 15
  • 3

1 Answers1

0

My working code creates the fax object like below...

Set oNewFax = oFaxServer.CreateObject(coFax)
Jason
  • 16