"Select Printer" pops up after calling ConnectedSubmit ()

  • Thread starter Thread starter Jonny
  • Start date Start date
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.

I'm running as my own local user account (with admin priveledges
etc.), and it does this even with no other printers installed.

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("");

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();
}
 
I've found that this only appears to happen because I'm sending
".html" files to the fax printer - it doesn't happen with ".txt"
files.

Any ideas on how to circumvent this problem?

J.
 
Back
Top