Hi,
I have 1 HTML page in string builder. which consist number of tables. after each table I putted page break for printing purpose.Now I need to Fax this HTML page.
after each page break page should be faxed on another page. I need to do this either vb.net or C# .
any help would be greatly appreciated
Thanks...
Loading
Hemant KumarPosted Sep 24, 2011, 12:26 AM
using System;
using FAXCOMLib;
namespace ConsoleApplication3
{
///
/// Summary description for Class1.
///
class Class1
{
public Class1()
{
}
public void FaxDocument(String TheFile, string faxnumber)
{
FAXCOMLib.FaxServer server = new FaxServerClass();
FAXCOMLib.FaxDoc doc = null;
int response = -11;
try
{
server.Connect(Environment.MachineName);
}
catch(Exception e)
{
System.Console.WriteLine("1"+e.Message);
}
try
{
doc = (FAXCOMLib.FaxDoc)server.CreateDocument(TheFile);
}
catch(Exception e)
{
System.Console.WriteLine("doc error"+e.Message);
}
try
{
doc.FaxNumber = faxnumber;
doc.RecipientName = "Test";
doc.DisplayName = "work";
}
catch(Exception e)
{
System.Console.WriteLine("assignments" + e.Message);
}
try
{
response = doc.Send();
}
catch(Exception e)
{
System.Console.WriteLine( response + e.Message);
}
try
{
server.Disconnect();
}
catch(Exception e)
{
System.Console.WriteLine("2"+e.Message);
}
System.Console.WriteLine("w00t");
}
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
Class1 objcsFax = new Class1();
objcsFax.FaxDocument("C:\\test.txt", "8067");
}
}
}
Faxing with XP and C#
A good site that provides his own .dll and shows more
Shows how to use the win2000 fax services
Try another look at that good site