J
Jonny
I'm trying to use ConnectedSubmit() from .NET, but when I do so it
pops up a dialog box prompting me to choose a Fax Printer. If I just
hit the Print button (it has the fax already selected), it proceeds
normally, but I want the code to work without prompting a user to hit
print.
The code is below, nothing special about it
Many thanks in advance,
J.
public void FaxReport(string faxTo, string reportName, string
reportDescription, string outputFilename)
{
FAXCONTROLLib.FaxControl faxControl = new
FAXCONTROLLib.FaxControlClass();
log.Debug("Is fax service installed? " +
faxControl.IsFaxServiceInstalled.ToString());
log.Debug("Is local fax printer installed? " +
faxControl.IsLocalFaxPrinterInstalled.ToString());
FAXCOMEXLib.FaxServer faxServer = new FaxServerClass();
faxServer.Connect(null);
FAXCOMEXLib.FaxDocument faxDoc = new
FAXCOMEXLib.FaxDocumentClass();
faxDoc.Recipients.Add(faxTo, "Somebody");
faxDoc.Body = outputFilename;
faxDoc.DocumentName = "Doco Name";
faxDoc.Sender.Name = "Bob";
faxDoc.Sender.BillingCode = "2A345";
faxDoc.Sender.Department = "Accts Payable";
faxDoc.Sender.FaxNumber = "+353 (1) 555 5555";
object obj = faxDoc.ConnectedSubmit(faxServer);
faxServer.Disconnect();
}
pops up a dialog box prompting me to choose a Fax Printer. If I just
hit the Print button (it has the fax already selected), it proceeds
normally, but I want the code to work without prompting a user to hit
print.
The code is below, nothing special about it
Many thanks in advance,
J.
public void FaxReport(string faxTo, string reportName, string
reportDescription, string outputFilename)
{
FAXCONTROLLib.FaxControl faxControl = new
FAXCONTROLLib.FaxControlClass();
log.Debug("Is fax service installed? " +
faxControl.IsFaxServiceInstalled.ToString());
log.Debug("Is local fax printer installed? " +
faxControl.IsLocalFaxPrinterInstalled.ToString());
FAXCOMEXLib.FaxServer faxServer = new FaxServerClass();
faxServer.Connect(null);
FAXCOMEXLib.FaxDocument faxDoc = new
FAXCOMEXLib.FaxDocumentClass();
faxDoc.Recipients.Add(faxTo, "Somebody");
faxDoc.Body = outputFilename;
faxDoc.DocumentName = "Doco Name";
faxDoc.Sender.Name = "Bob";
faxDoc.Sender.BillingCode = "2A345";
faxDoc.Sender.Department = "Accts Payable";
faxDoc.Sender.FaxNumber = "+353 (1) 555 5555";
object obj = faxDoc.ConnectedSubmit(faxServer);
faxServer.Disconnect();
}