View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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