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