Register   |  Login
You are hereArticles
 Article Details
Sending fax programmatically

 Sending fax is as simple as sending an e-mail. 

 We will make use of faxcom.dll component to send fax. This file is available in c:\windows\system32 (in Win XP) or c:\winnt\system32 (Win 2000). Add the reference to this component from the VS IDE.

Now it is available in VS IDE's intellisense.
If the file is not available, you can download this file from here and register the component by using regsvr32 utility.
Now we are done with setting up the library. Let’s get into the code.
Here is the code snippet.
                FAXCOMLib.FaxServerClass fsc = new FAXCOMLib.FaxServerClass();
            fsc.Connect("targetFax");
            object obj = fsc.CreateDocument("FileNameToBeSent");
            FAXCOMLib.FaxDocClass faxDoc = (FAXCOMLib.FaxDocClass)obj;
            faxDoc.FaxNumber = "RecipientFaxNo";
            faxDoc.RecipientName = "Destination";
            int result = faxDoc.Send();
            MessageBox.Show(result.ToString());
            fsc.Disconnect();
 
Note: The computer which sends the fax should have installed fax enabled modem.
I hope you will find this useful.

 


Written By: Kumaravel
Date Posted: 1/4/2009
Number of Views: 334


Comments
lu juan Says:
4/5/2011 5:25:02 PM

My favorite part of the suite is Microsoft Office 2010 . You can use it like a fancy clipboard, but Office 2010 is much more powerful and useful.So, I'm forced to pay for an upgrade to Microsoft Office that I did not want.For the price, you can't go wrong with Outlook 2010 Home & Student. And, I may or may not be able to use the Product Key on the package I purchased to activate only Word, Excel, Microsoft outlook 2010PowerPoint and OneNote, the programs I thought I was buying. The only answer was to go to MS Office, or have everyone else in the world switch to Office 2007 .The instructions on the Microsoft website for activating Office imply that the full Microsoft Office 2007 Professional suite is the only version eligible for proper licensing.


You must be logged in to submit a comment.

Return