Faxing in vb.net

  • Thread starter Thread starter Bob Day
  • Start date Start date
B

Bob Day

Using Vs2003, vb.net, msde..

I need to send a low volume of very simply text only faxes via a typlical
fax/modem that would be installed in a new off the shelf computer. I don't
see anything in help or MSDN (searching on fax) that show how to do this.

Can someone give me a starting point? A URL to example code would be great!

Thanks!

Bob
 
Bob, I've been using a 3rd party package called AthosFax (www.athosfax.com)
for awhile. Our company transmits a few thousand faxes with it each month.
The problem with it is the .net architecture is basically non-existent and
it can be difficult to use. I originally used it since our app was written
in VB6 and we ported it over to .net. With a bit of effort, I got it to
work. Currently I send text only documents, but would like to incorporate
some graphics into it....but it only supports PCX images, which you can't
generate with native .NET

If you find a solution I would appreciate it if you drop me a quick email.
I'll keep an eye on this thread also. Thanks.

Rob T. (rtorcelliniATwalchem.com)
 
Hi Bob,

Thanks for using Microsoft MSDN Managed Newsgroup. My name is Peter, and I
will be assisting you on this issue.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to send simple text fax
in VB.NET.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I think .NET Framework did not have class to support fax. But you can use
the Microsoft Fax Service, which is COM object, you can access it easily
via COM Interop. You use the COM object by easier adding a reference to it
in the VS.NET IDE directly.

Calling COM Components from .NET Clients
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/callcomcomp.asp

Fax Service
http://msdn.microsoft.com/library/en-us/fax/faxportal_9nol.asp

The SDK also provide a VB6 Sample, you can port it to VB.NET easily.
SimpleFaxSendForm, which demonstrates how to send a fax using the
FaxDocument object
Fax Service Extended COM Samples
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/faxabou
t_2ckz.asp

Please Apply My Suggestion Above And Let Me Know If It Helps Resolve Your
Problem.
However, if the problem still persists, please post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
I've never tried it, but why not set up a Fax as a stantard printer in the
Printers & Faxes folder in the control panel and print to it from your
application (assuming you have a Fax Modem and the appropiate drivers
installed)

I'm not sure how well it will work (e.g. how to stop it prompting for the
fax number every time you print something), but it's worth a try.

HTH,

Trev.
 
Hi!

Here is the code that I use to send a fax through VB.NET. According to the
COM MSDN pages that I used to write this, it has to run on WindowsXP (home
or pro) or Windows Server 2003. I send up to 75-100 faxes per day using
this method in a "Email/Fax Server". There are also hooks for coverpages
and to go through the sentbox and outbox to get status messages for sent
faxes (see the MSDN for more info.)

I made a reference to fxscomex.dll (or fxscom.dll - don't remember which
one) and then use this code.

Hope this helps.
--Scott


Try
Dim FS As FAXCOMEXLib.FaxServer
Dim FD As FAXCOMEXLib.FaxDocument
FS = New FAXCOMEXLib.FaxServer
FD = New FAXCOMEXLib.FaxDocument
FS.Connect("")

'** Build Fax Header
FD.Sender.TSID = m_TSID '** Not Currently Supported in SDK
FD.DocumentName = m_FaxID
FD.AttachFaxToReceipt = True
FD.Priority = m_Priority

'** Set Recipient
FD.Recipients.Add(m_RecipientFaxNumber, m_RecipientName)

'** Set Sender
FD.Sender.Name = m_SenderName
FD.Sender.Company = m_SenderCompany
FD.Sender.FaxNumber = m_SenderFaxNumber
FD.Sender.OfficePhone = m_SenderPhoneNumber
FD.Sender.Title = m_Motto

'** Set Subject/Body
FD.Subject = m_Subject
FD.Note = m_Body
FD.Body = m_TIFFPath

'** Fax Cover Page
FD.CoverPageType = m_CoverPageType
FD.CoverPage = m_CoverPageName

'** Submit Fax to WinXP Fax Service
Dim JobID As Object
JobID = FD.ConnectedSubmit(FS)

'** Clean Up Objects Here
catch ex as Exception
msgbox ex.tostring
end try
 
Sir
from fax service sdk start page, I found that win2k support the development of fax service. I installed the platform core sdk. but I can't find the fxscomex.dll and other importent dll files. I can't create the root object of fax service in my code. what can I do next to get the fxscomex.dll and others
waiting for your replay. thanks

Rick
 
Back
Top