P
Patel Mitesh
Hi All,
I have developed the Fax Application in ASP.NET, on windows 2003 server and
i want to fax the word file. I am using office 2003 for faxing the file. But
i not able to fax the doc file. If i use the .txt file than it work but when
i use the .doc file than gives error.
The code is given below.
Imports FAXCOMEXLib
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim fsc As New FaxServerClass
Dim doc As New FaxDocumentClass
doc.Body = "c:\TEST.doc" //document body
doc.DocumentName = "test.doc" 'FNStr;//document name
doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL
doc.Recipients.Add("9084509299", "Mitesh Patel")
doc.ReceiptType = 0
doc.ScheduleType = 0
doc.Sender.Name = "Test Fax" 'FName.Text.Trim();
doc.Sender.TSID = "FAX"
doc.AttachFaxToReceipt = True
Do_Conn(fsc, doc)
End Sub
Private Sub Do_Conn(ByVal fsc As FaxServerClass, ByVal doc As
FaxDocumentClass)
Try
fsc.Connect("rangam03")
fsc.Connect("rangam03")
doc.ConnectedSubmit(fsc)
fsc.Disconnect()
Catch ex As UnauthorizedAccessException
ErrLabel.Text = ex.ToString()
Catch eio As IOException
ErrLabel.Text = eio.ToString()
Catch e As Exception
ErrLabel.Text = e.ToString()
End Try
End Sub
End Class
Error comes:
System.IO.FileNotFoundException: Operation failed. at
FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer) at
_Default.Do_Conn(FaxServerClass fsc, FaxDocumentClass doc) in
D:\Utpal\LinkIt\FAX\Default.aspx.vb:line 31
I am sure that this error is due to the office 2003 so pleas help me in this
context
Thanks in Advance
Mitesh Patel
I have developed the Fax Application in ASP.NET, on windows 2003 server and
i want to fax the word file. I am using office 2003 for faxing the file. But
i not able to fax the doc file. If i use the .txt file than it work but when
i use the .doc file than gives error.
The code is given below.
Imports FAXCOMEXLib
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim fsc As New FaxServerClass
Dim doc As New FaxDocumentClass
doc.Body = "c:\TEST.doc" //document body
doc.DocumentName = "test.doc" 'FNStr;//document name
doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL
doc.Recipients.Add("9084509299", "Mitesh Patel")
doc.ReceiptType = 0
doc.ScheduleType = 0
doc.Sender.Name = "Test Fax" 'FName.Text.Trim();
doc.Sender.TSID = "FAX"
doc.AttachFaxToReceipt = True
Do_Conn(fsc, doc)
End Sub
Private Sub Do_Conn(ByVal fsc As FaxServerClass, ByVal doc As
FaxDocumentClass)
Try
fsc.Connect("rangam03")
fsc.Connect("rangam03")
doc.ConnectedSubmit(fsc)
fsc.Disconnect()
Catch ex As UnauthorizedAccessException
ErrLabel.Text = ex.ToString()
Catch eio As IOException
ErrLabel.Text = eio.ToString()
Catch e As Exception
ErrLabel.Text = e.ToString()
End Try
End Sub
End Class
Error comes:
System.IO.FileNotFoundException: Operation failed. at
FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer) at
_Default.Do_Conn(FaxServerClass fsc, FaxDocumentClass doc) in
D:\Utpal\LinkIt\FAX\Default.aspx.vb:line 31
I am sure that this error is due to the office 2003 so pleas help me in this
context
Thanks in Advance
Mitesh Patel