A
Admy
Unregistered / Unconfirmed
GUEST, unregistred user!
按下面的方式,可以实现传真发送
1、win xp 2003/sp2
2、标准modem
3、安装windows自带的fax功能,可以实现传真
现在需要装传真功能集成到自己的系统中
1、采用.Net 2003 c#开发
2、代码参考http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/faxabout_2ckz.asp
3、执行这一句,一直报错
objFaxDocument.ConnectedSubmit(objFaxServer)
错误内容:Operation Failed
4、在google上搜了,没找到合适答案
代码如下:
private void button8_Click(object sender, System.EventArgs e)
{
FAXCOMEXLib.FaxDocumentClass objFaxDocument=new FaxDocumentClass();
FAXCOMEXLib.FaxServerClass objFaxServer=new FaxServerClass();
objFaxServer.Connect(""
objFaxDocument.Body = "c://1.txt";
objFaxDocument.DocumentName = "My First Fax";
objFaxDocument.Priority =FAX_PRIORITY_TYPE_ENUM.fptHIGH;
objFaxDocument.Recipients.Add("14", "fjl999"
objFaxDocument.AttachFaxToReceipt = true;
objFaxDocument.CoverPageType = FAX_COVERPAGE_TYPE_ENUM.fcptSERVER;
objFaxDocument.CoverPage = "generic";
objFaxDocument.Note = "Here is the info you requested";
objFaxDocument.ReceiptAddress = "someone@example.com";
objFaxDocument.ReceiptType =FAX_RECEIPT_TYPE_ENUM.frtMAIL;
objFaxDocument.ScheduleType = FAX_SCHEDULE_TYPE_ENUM.fstSPECIFIC_TIME;
objFaxDocument.ScheduleTime = DateTime.Now;// CDate("4:35:47 PM"
objFaxDocument.Subject = "Today's fax";
objFaxDocument.Sender.Title = "Mr.";
objFaxDocument.Sender.Name = "Bob";
objFaxDocument.Sender.City = "Cleveland Heights";
objFaxDocument.Sender.State = "Ohio";
objFaxDocument.Sender.Company = "Microsoft";
objFaxDocument.Sender.Country = "USA";
objFaxDocument.Sender.Email = "someone@microsoft.com";
objFaxDocument.Sender.FaxNumber = "12165555554";
objFaxDocument.Sender.HomePhone = "12165555555";
objFaxDocument.Sender.OfficeLocation = "Downtown";
objFaxDocument.Sender.OfficePhone = "12165555553";
objFaxDocument.Sender.StreetAddress = "123 Main Street";
objFaxDocument.Sender.TSID = "Office fax machine";
objFaxDocument.Sender.ZipCode = "44118";
objFaxDocument.Sender.BillingCode = "23A54";
objFaxDocument.Sender.Department = "Accts Payable";
objFaxDocument.Sender.SaveDefaultSender();
//据说可能是文件不存在,这里检查一下
System.IO.FileInfo x=new System.IO.FileInfo(objFaxDocument.Body);
MessageBox.Show(x.Exists?"文件存在":"文件不存在"
try
{
//就这一句,一直出错
object JobID = objFaxDocument.ConnectedSubmit(objFaxServer);
string[] xx=(string[])JobID ;
MessageBox.Show("The Job ID is :" +xx[0]);
}
catch(Exception ex)
{
MessageBox.Show (ex.ToString() );
}
}
http://community.csdn.net/Expert/topic/4246/4246072.xml
1、win xp 2003/sp2
2、标准modem
3、安装windows自带的fax功能,可以实现传真
现在需要装传真功能集成到自己的系统中
1、采用.Net 2003 c#开发
2、代码参考http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/faxabout_2ckz.asp
3、执行这一句,一直报错
objFaxDocument.ConnectedSubmit(objFaxServer)
错误内容:Operation Failed
4、在google上搜了,没找到合适答案
代码如下:
private void button8_Click(object sender, System.EventArgs e)
{
FAXCOMEXLib.FaxDocumentClass objFaxDocument=new FaxDocumentClass();
FAXCOMEXLib.FaxServerClass objFaxServer=new FaxServerClass();
objFaxServer.Connect(""
objFaxDocument.Body = "c://1.txt";
objFaxDocument.DocumentName = "My First Fax";
objFaxDocument.Priority =FAX_PRIORITY_TYPE_ENUM.fptHIGH;
objFaxDocument.Recipients.Add("14", "fjl999"
objFaxDocument.AttachFaxToReceipt = true;
objFaxDocument.CoverPageType = FAX_COVERPAGE_TYPE_ENUM.fcptSERVER;
objFaxDocument.CoverPage = "generic";
objFaxDocument.Note = "Here is the info you requested";
objFaxDocument.ReceiptAddress = "someone@example.com";
objFaxDocument.ReceiptType =FAX_RECEIPT_TYPE_ENUM.frtMAIL;
objFaxDocument.ScheduleType = FAX_SCHEDULE_TYPE_ENUM.fstSPECIFIC_TIME;
objFaxDocument.ScheduleTime = DateTime.Now;// CDate("4:35:47 PM"
objFaxDocument.Subject = "Today's fax";
objFaxDocument.Sender.Title = "Mr.";
objFaxDocument.Sender.Name = "Bob";
objFaxDocument.Sender.City = "Cleveland Heights";
objFaxDocument.Sender.State = "Ohio";
objFaxDocument.Sender.Company = "Microsoft";
objFaxDocument.Sender.Country = "USA";
objFaxDocument.Sender.Email = "someone@microsoft.com";
objFaxDocument.Sender.FaxNumber = "12165555554";
objFaxDocument.Sender.HomePhone = "12165555555";
objFaxDocument.Sender.OfficeLocation = "Downtown";
objFaxDocument.Sender.OfficePhone = "12165555553";
objFaxDocument.Sender.StreetAddress = "123 Main Street";
objFaxDocument.Sender.TSID = "Office fax machine";
objFaxDocument.Sender.ZipCode = "44118";
objFaxDocument.Sender.BillingCode = "23A54";
objFaxDocument.Sender.Department = "Accts Payable";
objFaxDocument.Sender.SaveDefaultSender();
//据说可能是文件不存在,这里检查一下
System.IO.FileInfo x=new System.IO.FileInfo(objFaxDocument.Body);
MessageBox.Show(x.Exists?"文件存在":"文件不存在"
try
{
//就这一句,一直出错
object JobID = objFaxDocument.ConnectedSubmit(objFaxServer);
string[] xx=(string[])JobID ;
MessageBox.Show("The Job ID is :" +xx[0]);
}
catch(Exception ex)
{
MessageBox.Show (ex.ToString() );
}
}
http://community.csdn.net/Expert/topic/4246/4246072.xml