InfoPath 2007 RightFax automation issue C# - InfoPath Dev
in

InfoPath Dev

InfoPath 2007 RightFax automation issue C#

Last post 09-04-2014 10:08 AM by Wheels. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-04-2014 10:08 AM

    InfoPath 2007 RightFax automation issue C#

    We are experiencing an issue with image quality and missing information on the InfoPath form when submitted automatically using the email Data Connection. When a user faxes the form manually (File --> PPrint --> RightFax fax printer) it displays correctly. The reason for this is the PTF driver image quality with differs from the image quality of the RF printer driver.

    I wrote some C# code to set the properties and submit as follows:

    this.SaveAs("C:\\Data\\Excel\\InfoPath.xsn");

    // Write your code here.
    RFCOMAPILib.FaxServerClass faxserver = new RFCOMAPILib.FaxServerClass();
    faxserver.ServerName = "RightFax";
    faxserver.Protocol = RFCOMAPILib.CommunicationProtocolType.cpNamedPipes;
    faxserver.UseNTAuthentication = RFCOMAPILib.BoolType.True;
    faxserver.OpenServer();

    RFCOMAPILib.Fax fax = (RFCOMAPILib.Fax)faxserver.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax);

    // set up your 'fax' object the way you want it, below is just some sample options
    fax.ToName = "Recipient";
    fax.ToFaxNumber = "1234567890";
    fax.ToVoiceNumber = "1234567890";
    fax.ToCompany = "ToCompany";
    fax.FromName = "FromCompany";
    fax.FromVoiceNumber = "1234567890";
    fax.IsFineMode = RFCOMAPILib.BoolType.True;
    fax.Attachments.Add("C:\\Data\\Excel\\InfoPath.xsn", RFCOMAPILib.BoolType.False);
    fax.Send();
    faxserver.CloseServer();

    This works (not well), but I think this is a half-baked way of doing it. What I would like is the following:

    * If InfoPath had a printer Data Source this would be ideal.

    * If I go with the C# code, I would need to figure out how to 'attach' the current form to be included in the body of the fax.

    Thank you, WHEELS

     

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.