FAXCOMLIB send error

B

Bob

Hi,
Win2kServer Platform
I dusted off some fax sending code that used to work.
The send is now returning
'The date is invalid.
System.Runtime.InteropServices.COMException(0x8007000D): The data is invalid
as FAXCOMLIB.IFaxDoc.Send()
(Code Below)

I recently just installed a PCI modem card for the test. However it sends
the test file fine if I open the file in Word and then 'send to FAX
Recipient'.
Anybody struck anything similar?

Thanks
Bob
Public Sub SendFax()

Dim FaxServer As New FAXCOMLib.FaxServer

Dim FaxDoc As FAXCOMLib.FaxDoc

Dim intResult As Int32

Try

FaxServer.Connect(Environment.MachineName)

FaxDoc = CType(FaxServer.CreateDocument("c:\temp\mytest.txt"),
FAXCOMLib.FaxDoc)

FaxDoc.FaxNumber = "14727658"

FaxDoc.DisplayName = "Tester"

FaxDoc.RecipientName = "Tester"

intResult = FaxDoc.Send

FaxServer.Disconnect()

Catch obja As System.Exception

MsgBox("clsFaxer.SendFax " & obja.Message & obja.GetBaseException.ToString)

End Try

End Sub
 
S

smith

Hi again Bob.

Gotta thank you for your other question a few weeks back, it got me into
testing the XP/2k3server Fax system with the extended COM library and I've
found it quite nice (but there are a few tricks that had to be finagled
first. I posted one of the biggies on the win2000.fax NG)

Was "The *date* is invalid" a mistype? The exception after that says
*data*.

Anyway, I've now got a consumer fax modem in my XP box here and I added a
reference to the 2k legacy FAXCOMLib (which is on XP along with the new
extended COM interface), then copied your code directly to that VB2003
project and it ran just fine with no changes. My test file is a simple text
(*.txt) file written in notepad and the text is a single line "this is a
test". Is your test file substantially more complex than that?

You say that you were able to "print it" to the fax outbox by opening it in
Word first and I assume that if you open it in Notepad and use the fax
printer it also will go out with no problems, right?

Smith
Kirkland, WA
 
C

chubblogic

I am having the exact same problem. Can't figure it out - modem works fine, but the code doesn't, and the error message doesn't yield any info.



Hi,
Win2kServer Platform
I dusted off some fax sending code that used to work.
The send is now returning
'The date is invalid.
System.Runtime.InteropServices.COMException(0x8007000D): The data is invalid
as FAXCOMLIB.IFaxDoc.Send()
(Code Below)

I recently just installed a PCI modem card for the test. However it sends
the test file fine if I open the file in Word and then 'send to FAX
Recipient'.
Anybody struck anything similar?

Thanks
Bob
Public Sub SendFax()

Dim FaxServer As New FAXCOMLib.FaxServer

Dim FaxDoc As FAXCOMLib.FaxDoc

Dim intResult As Int32

Try

FaxServer.Connect(Environment.MachineName)

FaxDoc = CType(FaxServer.CreateDocument("c:\temp\mytest.txt"),
FAXCOMLib.FaxDoc)

FaxDoc.FaxNumber = "14727658"

FaxDoc.DisplayName = "Tester"

FaxDoc.RecipientName = "Tester"

intResult = FaxDoc.Send

FaxServer.Disconnect()

Catch obja As System.Exception

MsgBox("clsFaxer.SendFax " & obja.Message & obja.GetBaseException.ToString)

End Try

End Sub

User submitted from AEWNET (http://www.aewnet.com/)
 
B

Bob

Hi,
Fixed.
It was a simple as returning the registration of .txt file back to notepad.
It was previously assigned to my 3rd party text editor.
thanks
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top