Send fax

  • Thread starter Thread starter Mircea Pleteriu
  • Start date Start date
M

Mircea Pleteriu

Does anybody know how to send a fax from c#.
Is there any suppport for sending faxes?

Thanks
 
Hi,

If you don't mind doing COM Interop you can leverage the fax service in
Windows 2000/XP. You start by adding a COM reference to FAXCOM.DLL (usually
under C:\WINNT\SYSTEM32), then create two objects: FaxServer and FaxDoc.

You use the FaxServer object to connect to your server, and then create
FaxDoc object passing the document you want to fax. At this point you set
the number to dial, send the fax, and disconnect from the server.

You can find the Fax Service Extended COM API documentation here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/faxabout_699l.asp

Gabriele
 
Hi,

This is my code:

FAXCOMLib.FaxServerClass fxsvr = new FAXCOMLib.FaxServerClass();

FAXCOMLib.FaxDocClass fxdoc;



try

{

fxsvr.Connect(""); // null for local fax server otherwise a computername

fxdoc = (FAXCOMLib.FaxDocClass)fxsvr.CreateDocument(@"c:\test.txt");

fxdoc.FaxNumber = "0269446970";

fxdoc.Send();

fxsvr.Disconnect();

}

catch (Exception ex )

{

Console.WriteLine( ex.ToString());

}

But the call of fxsvr.Connect("") throws an

System.Runtime.InteropServices.COMException exception and the message is "Unspecified error"

Do you know why that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

windows fax scanner: blank fax sent?! 12
help in recieving fax by FAXCOMLib 0
News Fax machines can be used to hack PCs 1
Fax software 0
FAX advice, please - programmes and apps. 2
Win2000 fax 0
PamFax for Outlook 0
Fax Console 1

Back
Top