Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Hi All,
I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with ..doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
You forgot to include your code.
Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then print to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Hi, Peter
Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to ..tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then print to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
I forgot to ask the obvious question: do you actually have Word on the
system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then print to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Hi Peter,
Yes i have office 2003 installed in my pc. And sorry i not get you in the line "If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003)" So please clarify. Regards, Mitesh Patel "Peter Jamieson" wrote: I forgot to ask the obvious question: do you actually have Word on the system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then print to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
I meant: Have a look at
http://tips.pjmsn.me.uk/t0001.htm and specifically look at the second Sub on that page, i.e. Sub MergeOneFaxPerSourceRecEx() because the first one probably will not work with Windows 2003 Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, Yes i have office 2003 installed in my pc. And sorry i not get you in the line "If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003)" So please clarify. Regards, Mitesh Patel "Peter Jamieson" wrote: I forgot to ask the obvious question: do you actually have Word on the system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then print to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Hi Peter,
I have used the code given by you but still i have same problem that describe you. So please guide me in this matter. Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: I meant: Have a look at http://tips.pjmsn.me.uk/t0001.htm and specifically look at the second Sub on that page, i.e. Sub MergeOneFaxPerSourceRecEx() because the first one probably will not work with Windows 2003 Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, Yes i have office 2003 installed in my pc. And sorry i not get you in the line "If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003)" So please clarify. Regards, Mitesh Patel "Peter Jamieson" wrote: I forgot to ask the obvious question: do you actually have Word on the system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then print to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#8
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Does the code successfully create a .tif file when it executes
oApp.PrintOut _ Background:=False, _ Append:=False, _ Range:=wdPrintAllDocument, _ OutputFileName:=sTifPath, _ Item:=wdPrintDocumentContent, _ Copies:=1, _ PageType:=wdPrintAllPages, _ PrintToFile:=True ? (You should be able to find the file in Windows Explorer) What application is the .tif extension associated with? (e.g. look in "Windows Explorer"|"Folder Options"|"File types", then look for TIF)? Is a Printto verb listed in there, and if so, what is the code associated with that verb? Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, I have used the code given by you but still i have same problem that describe you. So please guide me in this matter. Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: I meant: Have a look at http://tips.pjmsn.me.uk/t0001.htm and specifically look at the second Sub on that page, i.e. Sub MergeOneFaxPerSourceRecEx() because the first one probably will not work with Windows 2003 Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, Yes i have office 2003 installed in my pc. And sorry i not get you in the line "If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003)" So please clarify. Regards, Mitesh Patel "Peter Jamieson" wrote: I forgot to ask the obvious question: do you actually have Word on the system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#9
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Hi Peter,
Actually I made my application in asp.net and as per the link you send me i try to write the code but i not get the " oApp = new Application" and also when i used the code given by you for printing the .tif file it prompt me that "Operation Failed : Printer is not installed on the machine" but the fax printer is already installed on my machine and also it is shared and also given the premission (Rights) to asp.net, everyone to full access. I also check by opeaning the word document and click "File - send to - Receipient to FAX Modem " and the fax wizard is open and able to fax the document . If i miss something in this than please let me know. I also submit same to asp.net and vb.net forum of microsoft but yet I not get any reply from them. "Peter Jamieson" wrote: Does the code successfully create a .tif file when it executes oApp.PrintOut _ Background:=False, _ Append:=False, _ Range:=wdPrintAllDocument, _ OutputFileName:=sTifPath, _ Item:=wdPrintDocumentContent, _ Copies:=1, _ PageType:=wdPrintAllPages, _ PrintToFile:=True ? (You should be able to find the file in Windows Explorer) What application is the .tif extension associated with? (e.g. look in "Windows Explorer"|"Folder Options"|"File types", then look for TIF)? Is a Printto verb listed in there, and if so, what is the code associated with that verb? Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, I have used the code given by you but still i have same problem that describe you. So please guide me in this matter. Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: I meant: Have a look at http://tips.pjmsn.me.uk/t0001.htm and specifically look at the second Sub on that page, i.e. Sub MergeOneFaxPerSourceRecEx() because the first one probably will not work with Windows 2003 Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, Yes i have office 2003 installed in my pc. And sorry i not get you in the line "If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003)" So please clarify. Regards, Mitesh Patel "Peter Jamieson" wrote: I forgot to ask the obvious question: do you actually have Word on the system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then to the fax printer. The following article is actually about using Mail Merge to print to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
#10
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Word 2003 gives error while sending fax in asp.net application
Actually I made my application in asp.net and as per the link you send me
i try to write the code but i not get the " oApp = new Application" and also OK, the other way of doing this in VBA is as follows: Set oApp = CreateObject("Word.Application") However, I don't know how you do that in asp.net . Also, in theory you should verify that the object was created. when i used the code given by you for printing the .tif file it prompt me that "Operation Failed : Printer is not installed on the machine" If you have already modified the following line to correspond to your Fax Printer's name Const sFaxPrinter = "Fax" then the only other thing I can suggest is that you may need to alter the code here, as I suggest (I'm not sure how you could execute this if you had not managed to set oApp anyway :-) ' don't change the printer if it is already ' correctly set up ' (I had problems when I tried to switch ' to the fax printer in code) ' you may need to adjust this for your ' fax printer name If Left(sActivePrinter, 3) sFaxPrinter Then oApp.ActivePrinter = sFaxPrinter End If Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, Actually I made my application in asp.net and as per the link you send me i try to write the code but i not get the " oApp = new Application" and also when i used the code given by you for printing the .tif file it prompt me that "Operation Failed : Printer is not installed on the machine" but the fax printer is already installed on my machine and also it is shared and also given the premission (Rights) to asp.net, everyone to full access. I also check by opeaning the word document and click "File - send to - Receipient to FAX Modem " and the fax wizard is open and able to fax the document . If i miss something in this than please let me know. I also submit same to asp.net and vb.net forum of microsoft but yet I not get any reply from them. "Peter Jamieson" wrote: Does the code successfully create a .tif file when it executes oApp.PrintOut _ Background:=False, _ Append:=False, _ Range:=wdPrintAllDocument, _ OutputFileName:=sTifPath, _ Item:=wdPrintDocumentContent, _ Copies:=1, _ PageType:=wdPrintAllPages, _ PrintToFile:=True ? (You should be able to find the file in Windows Explorer) What application is the .tif extension associated with? (e.g. look in "Windows Explorer"|"Folder Options"|"File types", then look for TIF)? Is a Printto verb listed in there, and if so, what is the code associated with that verb? Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, I have used the code given by you but still i have same problem that describe you. So please guide me in this matter. Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: I meant: Have a look at http://tips.pjmsn.me.uk/t0001.htm and specifically look at the second Sub on that page, i.e. Sub MergeOneFaxPerSourceRecEx() because the first one probably will not work with Windows 2003 Peter Jamieson "Patel Mitesh" wrote in message ... Hi Peter, Yes i have office 2003 installed in my pc. And sorry i not get you in the line "If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003)" So please clarify. Regards, Mitesh Patel "Peter Jamieson" wrote: I forgot to ask the obvious question: do you actually have Word on the system that is sending the faxes? The fax system relies on being able to invoke the PrintTo verb for a given type of object, and if Word is not present, it cannot do that. The trouble is that I can no longer remember if it works even if Word (or perhaps the free Word viewer) is present - if for some reason the file association for .doc is no longer to Word it definitely would not work anyway. If you have Word, I suggest you try adapting the code on the page I pointed to (use the second example for Windows 2003) Peter Jamieson "Patel Mitesh" wrote in message ... Hi, Peter Thanks for your reply. sorry that i forget to include my code. 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" doc.DocumentName = "test.doc" doc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL doc.Recipients.Add("9084509299", "Mitesh Patel") doc.ReceiptType = 0 doc.ScheduleType = 0 doc.Sender.Name = "Test Fax" 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 Dim servername As String fsc.Connect("rangam03") fsc.Connect("rangam03") servername = fsc.ServerName 'doc.AttachFaxToReceipt = false; 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 The line " doc.ConnectedSubmit(fsc)" does everything. It automatically convert the .txt file to .tif file but not able to convert the .doc file to .tif file and that also through the fax printer. So pls help me to resolve this issue. My email address is . If you know any person who does this thing in past than please let me know through mail. Your prompt reply is appreciated Thanks & Regards, Mitesh Patel "Peter Jamieson" wrote: You forgot to include your code. Are you "printing" the .doc to the fax printer somehow? If so, how? What I have found in the past is that things are more likely to work if you explicitly Automate Word to produce a .tif file which you then to the fax printer. The following article is actually about using Mail Merge to to fax, so it contains more material than you probably need, but you may find it useful: http://tips.pjmsn.me.uk/t0001.htm Unfortunately I am no longer in a good position to test fax-related issues. Peter Jamieson "Patel Mitesh" wrote in message ... Hi All, I have developed one fax Application in asp.net, on windows 2003 and use the office 2003 to send the fax. I used the .txt file format to send the fax and it works but when i try with .doc than it gives me error. The code is given belw I have searched a lot for this application and i got at last that this the problem due to office 2003 so please help me to solve this problem. Thanks in Advance Mitesh Patel |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I get error message when sending document by e-mail. | New Users | |||
Task 'pop3 - Sending' reported error (0x800CCC0D) : 'Unable to fi | Microsoft Word Help | |||
Unexpected error in Microsoft Office Word when sending email | Microsoft Word Help | |||
Web mail merge application returning error "Permission denied" | Mailmerge | |||
Starting Word 2003 from within an application | Microsoft Word Help |