From: Bob on
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


From: smith on
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" <bob(a)nowhere.com> wrote in message
news:OeNymQuEFHA.3120(a)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(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
>
>


From: chubblogic on
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/)
From: Bob on
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" <rcsTAKEOUT(a)smithvoiceTAKEOUT.com> wrote in message
news:_WgQd.798$IU.649(a)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" <bob(a)nowhere.com> wrote in message
> news:OeNymQuEFHA.3120(a)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(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
> >
> >
>
>