[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Problem sending fax in vb.net with faxcom.dll (FAXCOMLib)

Rus

12/18/2002 10:43:00 PM


I have looked everywhere (I think) and cannot get this
thing to work. Please help!

I'm writing a service app w/ vb.net on Win2K server that
must fax Excel spreadsheets. Unfortunately I cannot even
fax a text file.

I believe I have the fax stuff setup correctly as I can
fax manually just fine.

I'm using the FAXCOMLib (faxcom.dll). I have read
http://msdn.microsoft.com/library/de...
url=/msdnmag/issues/01/08/faxserv/toc.asp
and used this code as a guideline. I've also found other
message threads elsewhere, but no one seems to have this
problem.

The problem is that when FaxDoc.Send() is called, I get
this error message-

Interop.FAXCOMLib, The data is invalid., at
FAXCOMLib.IFaxDoc.Send()

I have tried setting all the properties of my FaxDoc, with
the same results. I've also tried running the service
with different permissions, with the same results.

The fax service does start when the connection is made,
btw. This is shown in the event log, but it records no
warnings, errors, etc. only the message that it started.

If anyone has experience with this please help.

Thanks in advance,
Rus




Code:

Dim faxSvr As FAXCOMLib.FaxServer
Dim faxDoc As FAXCOMLib.FaxDoc

faxSvr = New FAXCOMLib.FaxServer()
faxSvr.Connect("MY_MACHINE_NAME")
faxDoc = faxSvr.CreateDocument("c:\test.txt")
faxDoc.FaxNumber = "555-1212"
faxDoc.DisplayName = "John Doe"
faxDoc.RecipientName = "John Doe"
faxDoc.DiscountSend = 0
faxDoc.SendCoverpage = 0
faxDoc.Send()