471,624 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

FAXCOMLIB send error

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(0x8007 000D): 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
Nov 21 '05 #1
3 5476
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
"Bob" <bo*@nowhere.com> wrote in message
news:Oe**************@TK2MSFTNGP12.phx.gbl...
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(0x8007 000D): 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

Nov 21 '05 #2
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(0x8007 000D): 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/)
Nov 21 '05 #3
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
"smith" <rc********@smithvoiceTAKEOUT.com> wrote in message
news:_W**************@newsread3.news.pas.earthlink .net...
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
"Bob" <bo*@nowhere.com> wrote in message
news:Oe**************@TK2MSFTNGP12.phx.gbl...
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(0x8007 000D): 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


Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ponty | last post: by
reply views Thread by vbMark | last post: by
reply views Thread by Will Arrowsmith | last post: by
reply views Thread by Will Arrowsmith | last post: by
1 post views Thread by XIAOLAOHU | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.