none
Can I send multiple faxes (files) to one number in one call.

    Question

  • Can I send multiple files as 1 fax? I currently can fax one file at a time. I was wonder can I send multiple files to the same fax number on one call? Without physicall trying to combine files. For example. If I wanted to send a word doc and a pdf to the same person can I do that without having to dial twice?  I hope that makes sense. I don't know if you can because I see that FaxDocment.body is string and not a list of strings.

    I am using FaxServer and FaxDocument.

    I just Found FaxDocument.Bodies. Does anyone have an example on how to use this? I know that FaxDocument.Body is a file path. FaxDocument.Bodies is an object? I don't see an list of path or whatever. Any ideas?

    Any help would be great.
    Thanks
    apalcer
    Wednesday, January 27, 2010 8:56 PM

Answers

All replies

  • Can I send multiple files as 1 fax? I currently can fax one file at a time. I was wonder can I send multiple files to the same fax number on one call? Without physicall trying to combine files. For example. If I wanted to send a word doc and a pdf to the same person can I do that without having to dial twice?  I hope that makes sense. I don't know if you can because I see that FaxDocment.body is string and not a list of strings.

    Any help would be great.
    Thanks
    apalcer
    • Merged by Harry Zhu Tuesday, February 02, 2010 4:37 AM
    Wednesday, January 27, 2010 6:54 PM
  • I don't know anything about faxing in C# but you may be able to print all the files you want to something like OneNote and then send that.

    Wednesday, January 27, 2010 7:07 PM
  • Thanks for your suggestion. But I am using FaxServer in vb. I can do it one at a time, but I just wondering if I had multiple file going to one number, is there way I can do it on one call. I am currently using a FaxDocument and FaxServer.

    FaxDocument.Boy is a string. So I am not sure if I am going to be able to do it that way. 

    Thanks
    Apalcer


    My bad.. thought I was in vb forum. However, I can still read C#. So any suggestions vb or C# would awsome!!!!     :)

    Wednesday, January 27, 2010 8:53 PM
  • Hi,

    Have you checked on some of the other

    email to fax and fax to email services and programs available on the internet?

    See.>>

    http://www.google.co.uk/search?hl=en&rlz=1R2ADSA_enGB354&q=mail+to+fax+free&meta=&aq=0&oq=mail+to+fax

    See some of these FREE downloads!! >>

    http://www.freedownloadscenter.com/Search/fax_freeware.html


    Regards,

    John
    • Marked as answer by Jeff Shan Monday, February 01, 2010 2:59 AM
    Thursday, January 28, 2010 2:44 AM
  • According to the documentation, you can use either Body or Bodies, but not both.  Have you tried setting Body to Null and adding several documents into Bodies?  Eg, "myfile.txt;anotherfile.doc".

    http://msdn.microsoft.com/en-us/library/aa358908(VS.85).aspx
    • Marked as answer by Jeff Shan Monday, February 01, 2010 2:59 AM
    Thursday, January 28, 2010 3:08 AM
  • You can always concatenate all the strings from all the documents. You might want to insert a page break between them, is there a page break escape sequence?
    Thursday, January 28, 2010 1:55 PM
  • It flips out on me when I go Bodies = strBodies.
    strBodies = file1.txt;fax2.txt;fax3.txt

    it gives me .... The operation identifier is not valid. (Exception from HRESULT: 0x800710DD)

    Tuesday, February 02, 2010 8:14 PM
  • Are you running on Vista?   Are you using the 2 versions of ConnectedSubmit or Submit - ie ConnectedSubmit2 or Submit 2?

     

    Tuesday, February 02, 2010 8:47 PM
  • I have not even gotten to that point. I am on Vista/Windows 7. I am not able to set FaxDocument.Bodies to anything. It keeps giving me that error. I am still trying to set up FaxDocument.  I made sure FaxDocument.Body is set to Nothing before messing with Bodies and I am still having issue.

    Thanks
    Apalcer


    Tuesday, February 02, 2010 9:42 PM
  • I don't understand.  You say that you can currently send one fax.  Therefore you must be using either Submit/ComnnectedSubmit, or Submit2/ConnectedSubmit2.

    You can only reference bodies if you are using Submit2/ConnectedSubmit2.
    Tuesday, February 02, 2010 10:08 PM
  • That is an issue I am trying to figure out.

    I am getting an error when I try to set bodies. Is there some unique way that I need to set bodies of FaxDocument. I havent event gotten to the point of FaxDoc.Submit2. Because I will not be able to submit anything if bodies  is nothing. I am TRYING to set up the document.  I am able to send 1 fax at a time using FaxDocument.Body (which is a string that I assigned tha path of the file). When I try setting FaxDocument.Bodies = "fax1.txt;fax2.txt;fax3.txt" it gives me this Comm Exception Error......  The operation identifier is not valid. (Exception from HRESULT: 0x800710DD) 

    I have tried to cast the string to an object and what ever else I can think of. So I don't know if there is an issue because Bodies is an object and NOt a string (although in my opinion, that shouldnt matter). Am I allowed to set Bodies to a String...because the example makes it look like you can. Which is very odd because body is a string.  I also get this error when I trie to set Bodies = Nothing.

    What would be awsome is, if I can find a WORKING example of FaxDocument.Bodies?

    Thank you for helping me.
    Apalcer
    Tuesday, February 02, 2010 10:32 PM
  • I am able to send 1 fax at a time using FaxDocument.Body (which is a string that I assigned tha path of the file).

    If you are able to send 1 fax at a time then you must be using either Submit/ConnectedSubmit, or Submit2/ConnectedSubmit2.  If you are using Submit/ConnectedSubmit then you will not be able to use Bodies.  If you can use Submit2/ConnectedSubmit2 then you should be able to use Bodies.  That's why it's important to know which you are using.

    You won't get around the problem by fiddling with the type - a variant will accept any sort of expression to set its value.
    Tuesday, February 02, 2010 10:56 PM
  • Ok....

    I understand what you are saying. I am trying to get things switched over to Submit2/ConnectSubmit2, because I want to be able to send files as a fax at one time. Where I am getting hung up on is setting of the document so I can go FaxDoc.Submit2.  

    Can you give me an example of setting up FaxDocument that uses Submit2/ConnectSumbit2?  Maybe that will help.

    Here is portion of my code  (BLESS YOU if Can Read This) This for the most part works if I went one file and Attach it to Body...........

    Dim

     

    FaxDocumentObj As FaxDocument

     

    Dim bodies As New StringBuilder

     

    For Each FaxAttach As FaxMessageAttachment In FaxMessageObj.Attachments

     

    Dim Ext As String = GetExtension(FaxAttach.FileName)

    FaxDocumentObj.Body = FaxToTempFile(FaxAttach.Attachment, Ext)

     

    If String.IsNullOrEmpty(bodies.ToString) Then

    bodies.Append(FaxToTempFile(FaxAttach.Attachment, Ext))

     

    Else

    bodies.Append(

    ";" & FaxToTempFile(FaxAttach.Attachment, Ext))

     

    End If

     

    Next

    FaxDocumentObj.Body =

    Nothing

    FaxDocumentObj.Bodies = bodies.ToString    'RIGHT HERE IS WHERE I AM GETTING THAT ERROR. I AM NO WHERE NEAR CONNECTSUBMIT

    Tuesday, February 02, 2010 11:29 PM
  • OK.  I'll ask the question differently.

    The above code appears to be a mixture of FaxDocment and IFaxDocument2 properties and methods.  When you were successful in sending one fax, I presume you used the Body property to identify the document.  That means you were using FaxDocument. That seems to be confirmed by your use of the term 'switched over'.  What have you done to confirm that you are now using the correct interface (IfaxDocument2). For instance, what is the type definition for Body and Bodies as used int hat code?   Is the use of .Bodies  the first reference to a IFaxDocument property?  If so, then that indicates that you are not addressing the interface correctly.  That's what you need to solve - not the object type or string format for the filename string.

    Wednesday, February 03, 2010 12:27 AM
  • You would be correct, I was using body to identify the document. In my code type definition for Body is string. Bodies is Object
    Wednesday, February 03, 2010 12:47 AM
  • I don't believe you are using IFaxDocument2 at all.  AFAICT you error is simply due to using the incorect interface.  I'm sorry I can't be of more help, but if I can't confirm that you really are using IFaxDocument2 as you claim then it seems a bit pointless to be pursuing issues with an interface element that may not exist.
    Wednesday, February 03, 2010 1:01 AM
  •  I REALLY am happy for your help. Would you be able to give me an example of something that is using IfaxDocument2. Just so I can confirm everything.
    Wednesday, February 03, 2010 2:48 AM
  • The SDK sample is mentioned here:

    http://blogs.msdn.com/winsdk/archive/2009/11/16/send-multiple-files-to-fax-in-one-call.aspx

    The reference to a Samples folder in the V6.0 SDK might be out of date - all my SDKs are 6.0a and don't have the samples.  The 6.0 NetDS samples from MSDN are here:
    http://msdn.microsoft.com/en-us/library/aa315108(VS.60).aspx

    but there's no reference to a SendFax sample.  The SendFax sample is, however, in the 6.1 SDK - a default installation puts it at
    C:\Program Files\Microsoft SDKs\Windows\v6.1\Samples\NetDs\Fax\SendFax

    I don't know whether or not you have access to the SDKs, but it is strongly recommended.

    The sample application main form code for Bodies looks like this:

            Function DecodeToDocArray(ByVal inputDocListString As String, ByRef numDocuments As Integer, ByRef bRetVal As Boolean) As String()
                bRetVal = False
                If (String.IsNullOrEmpty(inputDocListString)) Then
                    Return Nothing
                End If
                Dim docArray As String()
                Dim strDelimiter As String
                Dim delimiter As Char()
    
                docArray = Nothing
                strDelimiter = ";"
                delimiter = strDelimiter.ToCharArray()
                docArray = inputDocListString.Split(delimiter)
                numDocuments = docArray.GetLength(0)
                bRetVal = True
                Return docArray
            End Function
    
    Dim retVal As Boolean
    Dim numDocs As Integer
    Dim docArray As String()
    
        numDocs = 0
        docArray = DecodeToDocArray(strDocList, numDocs, retVal)
        If ((docArray.GetLength(0) = 0) Or (retVal = False)) Then
            System.Console.WriteLine("DecodeToDocArray failed")
            bRetVal = False
            GoTo ExitFun
        End If
        objFaxDoc = New FaxDocumentClass()
        objFaxDoc.Bodies = docArray
        objFaxDoc.Sender.LoadDefaultSender()
        objFaxDoc.Recipients.Add(strNumber, "TestUser")
        Dim strJobIds As Object
        strJobIds = Nothing
       Dim iErrorIndex As Integer
    

    Notice that DocArray is string().  If the DLL is correctly installed, .Bodies will be identified as an Object, not a String (although that doesn't help a lot - String and String() are both objects).




    Wednesday, February 03, 2010 4:44 AM
  • Hey...I am working through this right now. Does it matter that I am on a windows 7 machine? I know there were changes from xp to vista. I have the dll for windows 7.

    Thanks
    Wednesday, February 03, 2010 4:16 PM
  • Hey....Can I have a bad dll. I have no idea what is wrong with this. I followed the above example. I looked it up the website. And It does not like be giving bodies any type of a value. What make body and bodies different. 

    I have attempted going through the IFaxDocument2.  I do not understand this?

    Wednesday, February 03, 2010 6:14 PM
  • Hey...I am working through this right now.
    Does it matter that I am on a windows 7 machine?
    I know there were changes from xp to vista.
    I have the dll for windows 7.

    Thanks



    Of course it makes a difference. 
    That is why we asked.
    Take a look at the "Run Time Requirements".

    Fax Service Start Page.

    I don't think Windows 7 is compatible. 
    And my bad eyes don't see Vista listed, either.

    Whose DLL are you using?

    Rudy  =8^D

    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, February 03, 2010 6:24 PM
  • Windows 7 is almost the same as Vista, so it probably doesn't matter.  Have you changed your code as per the example I provided so that bodies is set from a string array instead of from a delimited string?
    Wednesday, February 03, 2010 8:28 PM
  • Thats what I figured. The project is in kinda of a time crunch. So they where okay with making multiple calls. My boss and I sat there and stripped it down and ran it through the interface. Tried to follow the example and not matter what we did we could not assign anything to bodies. I am sure its something really dumb issue. But we were not able to resolve this issue. 

    I did think of one last question.....Do you think they have an issue with them being temp files?  I don't see why that will be an issue, because I got away with it doing one call at a time?



    Thanks for all of your help!!!!
    apalcer

    Friday, February 05, 2010 4:26 PM
  • Ok....I went back to playing with this today and I have RESOLVED this issue. I am SOOO HAPPY!!!!  The issue is I read that FaxDocument.Body has to be Nothing. So I had a line in there to make sure it was nothing.... FaxDocument.Body = Nothing. Well that put through all of this. The second i removed from my code it worked. Unreall!!!! So leason taken away......

    If you are working with FaxDocument.Body  DO NOT TOUCH FaxDocument.Bodies and if you are working with FaxDocument.Bodies DO NOT TOUCH FaxDocument.Body.

    This resolves this issue..........

    Thank YOU SO MUCH .... Acamar!!!


    :-)
    • Marked as answer by apalcer Thursday, February 11, 2010 10:52 PM
    Thursday, February 11, 2010 10:51 PM