tdecker81

Distinguished
Oct 31, 2006
2
0
18,510
I've searched the web and read about 100 pages on MSDN and I dont understand why the following code doesn't work. It error out everytime on the FaxDocument.Send line with a RunTime Error '-2147024890 (80070006) Method 'send' of object 'IFaxDoc' failed


Any Ideas would be great.

Public Function SendFax(FileName As Variant, FaxNumber As Variant, RecipName As Variant)

Dim objFaxServer As FaxServer
Dim FaxDocument As FaxDoc

Set objFaxServer = CreateObject("FaxServer.Faxserver")

Dim sSName As String
Dim iMsg As Integer

objFaxServer.Connect "//GLP-FAX"
objFaxServer.Connect "//GLP-FAX"

objFaxServer.ArchiveOutboundFaxes = 1
objFaxServer.Retries = 4
objFaxServer.RetryDelay = 4

Set FaxDocument = objFaxServer.CreateDocument(FileName)
FaxDocument.FaxNumber = FaxNumber
FaxDocument.DisplayName = "Tim"
FaxDocument.FileName = FileName
FaxDocument.Tsid = RecipName
Dim lSend As Long

FaxDocument.send

End Function


Sub TestFax()


Call SendFax("C:\test.doc", "1234567", "TEST")
End Sub
 

fattony

Distinguished
Oct 16, 2006
609
0
18,990
the account credentials the script is running under has permissions to manage the fax console in the fax management properties section for security?

can you run filemon and regmon to see where it might be failing? any access denies?
 

tdecker81

Distinguished
Oct 31, 2006
2
0
18,510
I'm running it on my computer logged into a domain as part of the administrators group.

I have full permissions over the fax management. I personally installed and set it all up. It shouldn't be a credentials issue. I'll check into it thank you for your input.