Data Browser - Viewing Site  Sector 23 Code Bank Logged in as:  Guest  




           


Sending a fax using Windows Faxing in C#
Adding a reference to FAXCOMLib.dll (COM/Fax Services) in Windows XP provides access to the Windows Fax Service, which you can use to send a fax as follows:


FAXCOMLib.FaxServer faxServer = new FAXCOMLib.FaxServerClass();
if (FaxNumber != "")
{
try
{
faxServer.Connect(MachineName);
faxServer.Retries = Retries;
faxServer.RetryDelay = RetryDelay;
FAXCOMLib.FaxDoc faxDoc = (FAXCOMLib.FaxDoc)faxServer.CreateDocument(FileName);
faxDoc.RecipientName = RecipientName;
faxDoc.FaxNumber = FaxNumber;
faxDoc.DisplayName = DocumentName;
int Response = faxDoc.Send();
success = true;
}
catch{}
finally
{
faxServer.Disconnect();
} // disconnect
} // send fax

Created By: amos 3/20/2006 12:13:01 AM
Updated: 9/10/2017 4:09:57 AM


 Comments:
 > Guest 5/14/2009 8:25:21 PM
very nice solution.but copmlete way from installing faxcomlib.dll and faxcomexlib.dll . ???????????




Muhammad Luqman Shahid (luqman_qau@yahoo.com)
 > amos 5/14/2009 10:11:40 PM
You have to go to windows - control panel - add remove programs - add remove windows components - add fax services. Then the reference will show up under COM when you click 'add reference' from visual studio.
 > Guest 5/22/2009 9:49:33 PM
good but in my second pc there is no faxcom 1.0 type liberary component. how install or add it in com ..







M.luqman Shahid(luqman_qau@yahoo.com)
 > Guest 12/10/2010 11:14:27 AM
how to get faxcom.dll