Hi, I am new to VB.Net and I am currently working on a FAX application.
So far I am able to send faxes with this code:
I now want to be able to receive faxes and save them to a file location. Is there anyone that can help, I cannot find any code examples for this.
Thanks in advance.
So far I am able to send faxes with this code:
Code:
[/color][/size][/font][/size][/font]
[color=blue][font='Courier New']Imports[/font][/color][font='Courier New'] FAXCOMEXLib[/font]
[color=blue][font='Courier New']Imports[/font][/color][font='Courier New'] FAXCOMLib[/font]
[color=blue][font='Courier New']Imports[/font][/color][font='Courier New'] System.IO[/font]
[color=blue][font='Courier New']Imports[/font][/color][font='Courier New'] System.IO.StreamWriter[/font]
[font='Courier New'] [/font]
[font='Courier New'] [/font]
[font='Courier New'] [/font]
[color=blue][font='Courier New']Public[/font][/color][font='Courier New'] [color=blue]Class[/color] Form1[/font]
[font='Courier New'] [/font]
[font='Courier New'] [color=blue]Private[/color] [color=blue]Sub[/color] Button1_Click([color=blue]ByVal[/color] sender [color=blue]As[/color] System.Object, [color=blue]ByVal[/color] e [color=blue]As[/color] System.EventArgs) [color=blue]Handles[/color] Button1.Click[/font]
[font='Courier New'] [color=blue]Try[/color][/font]
[font='Courier New'] [color=blue]Dim[/color] objFaxDocument [color=blue]As[/color] [color=blue]New[/color] FAXCOMEXLib.FaxDocument[/font]
[font='Courier New'] [color=blue]Dim[/color] objFaxServer [color=blue]As[/color] [color=blue]New[/color] FAXCOMEXLib.FaxServer[/font]
[font='Courier New'] [/font]
[font='Courier New'] [color=blue]Dim[/color] JobID [color=blue]As[/color] [color=blue]Object[/color][/font]
[color=blue][font='Courier New'] [/font][/color]
[color=blue][font='Courier New'] [/font][/color]
[font='Courier New'] objFaxServer.Connect([color=maroon]""[/color])[/font]
[font='Courier New'] objFaxDocument.Body = [color=maroon]"c:\Test.txt"[/color][/font]
[font='Courier New'] objFaxDocument.DocumentName = [color=maroon]"My First Fax"[/color][/font]
[font='Courier New'] objFaxDocument.Recipients.Add([color=maroon]"902380663584"[/color], [color=maroon]"Bud"[/color])[/font]
[font='Courier New'] objFaxDocument.AttachFaxToReceipt = [color=blue]True[/color][/font]
[font='Courier New'] objFaxDocument.Note = [color=maroon]"Here is the info you requested"[/color][/font]
[font='Courier New'] objFaxDocument.Subject = [color=maroon]"Today's fax"[/color][/font]
[font='Courier New'] JobID = objFaxDocument.ConnectedSubmit(objFaxServer)[/font]
[font='Courier New'] MsgBox([color=maroon]"The Job ID is :"[/color] & JobID(0))[/font]
[font='Courier New'] [/font]
[font='Courier New'] [color=blue]Catch[/color] ex [color=blue]As[/color] Exception[/font]
[font='Courier New'] MsgBox([color=maroon]"Error number: "[/color] & Hex(Err.Number) & [color=maroon]", "[/color] & Err.Description)[/font]
[font='Courier New'] [color=blue]End[/color] [color=blue]Try[/color][/font]
[font='Courier New'] [color=blue]End[/color] [color=blue]Sub[/color][/font]
[color=blue][font='Courier New']End[/font][/color][font='Courier New'] [color=blue]Class[/color][/font]
[color=blue][font='Courier New']
I now want to be able to receive faxes and save them to a file location. Is there anyone that can help, I cannot find any code examples for this.
Thanks in advance.