How to send Fax Using c#,FAXCOMLib

G

gowri

Hello
i tried to send fax using the following code.but it get an runtime
interop error.
the code as follows

public class fax : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button but;
protected FaxServerClass fs = new FaxServerClass();
private void Page_Load(object sender, System.EventArgs e)
{
//fs.Connect("Sri"); //specifies the machinename
object obj = fs.CreateDocument(@"c:\hello.doc");
FaxDoc fd = (FaxDoc)obj;
fd.FaxNumber = "number7#";
fd.RecipientName = "Tester";
fd.Send ();
int i = Convert.ToInt32 (fd.Send());
Response.Write (i.ToString());
fs.Disconnect();
// Put user code to initialize the page here
}

if this is not worthy can any one send me the code sample or
can provide me the clear root where i went wrong.
pls its an urgent.
 
C

Chandrasekar [MSFT]

Why is your Connect method commented?? You will have to connect to the fax
server first. Only after that you can send faxes. If you get a COm Exception
please send us the error code and the desccription that you get so that we
can easily debug it.

--
Chandrasekar R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'
 

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

Top