in Search
 
Home Blogs Forums Marketplace Files
 
 
 

Sending Word Documents as attachments to RightFax

Last post 07-18-2008, 3:30 PM by estone. 6 replies.
Sort Posts: Previous Next
  •  06-27-2008, 4:58 AM 14029

    Sending Word Documents as attachments to RightFax

    Hi,

    I'm developing a service in c# to send word documents via RightFax and I'm using Attachments.Add() to attach documents to a Fax object.  This works successfully for .txt documents, but .doc (2003) aren't being sent.

    Any help gratefully received.

  •  07-11-2008, 12:48 PM 14054 in reply to 14029

    Re: Sending Word Documents as attachments to RightFax

    I do not know much about c#, so can't comment there; However, ensure that the RightFax server has Office 03 installed and that RF was configured for the doc conversion (Conversion Engine). Refer to pages 93-97 of the RF Administration Guide for RF 9.3. Hope this helps.
  •  07-16-2008, 9:10 AM 14070 in reply to 14054

    Re: Sending Word Documents as attachments to RightFax

    Thanks for your help.  We're using version 9.0 and have now installed SP2 and HotFix3 to enable us to use the conversion engine.  We can now send PDF attachments, but not word 2000.  The errors in the event log are:

    RightFax WorkServer1 Module Event ID 3314

    CvlCP5Cr:Return from execution (0x29, 0x0, 0x2, 'C:\WINDOWS\TEMP\RFW95.tmp'). Time for call = 0 secs.

     

    And

    RightFax WorkServer1 Module Event ID 3314

    CP:Error (0x29) converting PCL-5 (attachment #0).

    Any help anyone can give gratefully recieved!

  •  07-16-2008, 11:20 AM 14074 in reply to 14070

    Re: Sending Word Documents as attachments to RightFax

    Are you able to send a word doc as a fax attachment through the RightFax FaxUtil program? If that does not work successfully, it could be a configuration problem on the server side and I would suggest talking with our technical support group for assistance. However, if you are able to successfully send the word doc as an attachment through FaxUtil, if you can provide a code snippet for review, then I may be able to assist in determing the cause of the issue.

    Thanks,

    Erin


    Erin Stone
    OpenText Developer Support Engineer
  •  07-17-2008, 1:21 AM 14079 in reply to 14074

    Re: Sending Word Documents as attachments to RightFax

    Hi Erin

    Yes, we can send attachments through the RightFax Util program.  The code I've used is below - just to confirm, we can send PDF and txt files using this code, it's RTF, Word 00, 03, 07 that have a problem.

    Many thanks

    Keith

            {

                RFCOMAPILib.FaxServer faxServer = new RFCOMAPILib.FaxServer();

                faxServer.ServerName = "RBIQHSAPPP017";

                faxServer.AuthorizationUserID = "johnsonk2";

     

                faxServer.Protocol = RFCOMAPILib.CommunicationProtocolType.cpTCPIP;

                faxServer.UseNTAuthentication = RFCOMAPILib.BoolType.False;

     

                try

                {

                    faxServer.OpenServer();

     

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

                                 

                    fax.ToVoiceNumber = "123";

                    fax.ToName = "Keith Johnson";

                    fax.ToFaxNumber = "0123456789";

                    fax.FromName = "Keith Johnson";

                    fax.OwnerID = "Administrator";

     

                    fax.FromFaxNumber = "123";

                    fax.FromVoiceNumber = "123";

                   

                    fax.Attachments.Add(@"c:\faxtest\merge00.doc", RFCOMAPILib.BoolType.False); // Word 2000 document, Word 2002 installed on server

     

                    string faxCoverSheet = "This is a test.";

     

                    fax.set_CoverSheetNotes(1, faxCoverSheet);                   

     

                    fax.Send();

                   

                    string faxHandle = Convert.ToString(fax.Handle);

     

                    if (fax.FaxErrorCode.ToString() != "fecNone")

                    {

                        MessageBox.Show("Error occurred: " + fax.FaxErrorCode.ToString(), this.Text.ToString());

                    }

                    else

                    {

                        MessageBox.Show("Fax sent successfully", this.Text.ToString());

                    }

     

                }

     

                catch (Exception ex)

                {

                    MessageBox.Show(ex.Message.ToString(), this.Text.ToString());

                }

                finally

                {

                    faxServer.CloseServer();

                }

            }

     

     

  •  07-18-2008, 9:48 AM 14092 in reply to 14079

    Re: Sending Word Documents as attachments to RightFax

    Keith,

    I am working on setting up an enviornment similar to yours, RF9.0, SP2 HotFix3, to research this - I'll update this thread with my results.

    Thanks,

    Erin


    Erin Stone
    OpenText Developer Support Engineer
  •  07-18-2008, 3:30 PM 14094 in reply to 14092

    Re: Sending Word Documents as attachments to RightFax

    Keith,

    Unfortuantely, I was unable to reproduce the behavior your are seeing. I set up a Windows Server 2003 with RightFax 9.0 SP2 HF3. This server does not have Microsoft Word installed. I made sure that the RightFax Conversion service was  up and running.

    On my desktop system, I installed the RightFax FaxUtil program and was able to successfully send a word document (97-2003) as a fax attachment.  Then I created a new C# project in VS2005, included the reference to the RFCOMAPI and copied in the code you posted previously. After changing the authorized user id and fax server name to match my settings, I was able to successfully send a word document (97-2003) as well as an RTF document. I was unable to send a Word 2007 document from either FaxUtil or the C# program.

    The fact that I was unable to send a Word 2007 document is expected since I did not have Word2007 on the server - the conversion engine that is in RF 9.0 SP2, HF3 cannot covert a Word2007 document on it's own.

    A couple of last thoughts on this issue:

    When you said eariler that you are able to send successfuly from FaxUtil, did you mean the "print to fax mechanism" that RightFax makes available through MSWord? The reason I ask is that the "print to fax" mechanism takes your word document and prints it to PCL format and then sends it over to the RightFax server. This is different than the RF FaxUtil stand alone program which uses functionality exposed via RFCOMAPI that your C# program would be using.

     Also, when I installed HF3, there were special instructions surrounding the HF in regards to the conversion service  - I noticed that for the conversion service to work properly, all steps need to be followed. I also noticed that the conversion service did not always start up automatically on my system and that I need to go into RF Enterprise Manager to verify it was started.

    I'm sorry that I could not be of more help. If you have any additional information you would like to provide, please feel free to post and I will take a look at it.

    Thanks,

    Erin


    Erin Stone
    OpenText Developer Support Engineer
View as RSS news feed in XML
  Privacy    Site Terms   Contact Administrator