I am trying to write some code that sends a fax from my computer, I am using VB.NET desktop application..
Here is my code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim objSender As FAXCOMEXLib.FaxSender = Nothing
Dim JobID As Object
objFaxServer.Connect("")
objFaxDocument.Priority = FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptHIGH
objFaxDocument.Body = "c:\invoice.txt"
objFaxDocument.DocumentName = "My First Fax"
objFaxDocument.Recipients.Add(stringPhoneNumber, "the man with the money")
objFaxDocument.AttachFaxToReceipt = True
objFaxDocument.Note = "first text fax of the day in vb"
objFaxDocument.Subject = "testing fax system in vb"
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)
MsgBox("The Job ID is :" & JobID(0))
Catch ex As Exception
MsgBox("Error number: " & Hex(Err.Number) & ", " & Err.Description)
End Try
End Sub
Now, when I press the button, the code runs without problems, and I get the jobID, but the fax is not received in my recipient fax machine.
I have a fax modem in the computer, and I connected the computer with the phone line. I send the fax to another line connected with fax machine. My computer runs windows 7 ultimate (64-bit).