Results 1 to 5 of 5

Thread: How to fax remotely through VB

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2003
    Location
    UK, Sheffield
    Posts
    29

    Angry How to fax remotely through VB

    Can anyone tell how to fax a file by using VB application remotely. I've installed WinFax on both fax host computer and fax client computer. My VB application will be run on the fax client computer. Both the computers have window 2000.

    My code is here:
    Dim FS As New FAXCOMLib.FaxServer
    Dim FD As New FAXCOMLib.FaxDoc
    Dim lngcount As Long

    FS.Connect (txtClientMachine.text) ' My Computer's name
    NomeFile = "c:\test.txt"
    Set FD = FS.CreateDocument(NomeFile)
    FD.FileName = NomeFile
    FD.FaxNumber = txtfaxno.Text ' Phony number
    FD.DisplayName = txtfaxno.Text
    FD.DiscountSend = 0
    FD.SendCoverpage = 0

    FD.Send
    FS.Disconnect
    Set FD = Nothing
    Set FS = Nothing
    MsgBox "Fax send successfully"

    When I run the code, the msgbox appears, that means fax send successfully. But when I check the winfax pro message manager, nothing was sent. Then I found the file was send to "Fax" instead of "WinFax".

    Can anyone tell me what's wrong with my settings?

    Thanks in advance

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,526
    I haven't looked at WinFax Pro's API/interface capabilities ina while, but an alternative might be to simply print the document to the WinFax printer driver that is installed when you install WinFax.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2003
    Location
    UK, Sheffield
    Posts
    29
    Thanks jdc2000. If I simply print the file via WinFax, can I code telephone number, attachment filename etc. in my VB application instead of using standard WinFax pro setting dialog box? If it's possible, can you give me a simple sample please?

  4. #4
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,526
    I'm not sure whether you could use the WinFax printer driver's settings in VB to enter the phone # etc. You could always use the WIndows API to enter the info into the dialog box, but that might be rather cumbersome. I am assuming that you have the WinFax SDK that you are using with VB. There should be help or manuals for that which might be of assistance.

    The following links may be of use:

    http://service1.symantec.com/SUPPORT...3?OpenDocument

    http://service1.symantec.com/SUPPORT...0?OpenDocument

    They were found at http://www.symantec.com by clicking on the 'Search' link and searching for 'WinFax SDK'

  5. #5
    Lively Member
    Join Date
    Oct 2001
    Posts
    105

    Re: How to fax remotely through VB

    Ho, ho, ho!

    It's an old thread, but I'll close it.

    JDC, you are not faxing using WinFax. You are faxing using MSFax. That code is for MSFax. WinFax objects all look like this "WinFax.something".

    MSFax is an optional component with Windows installations, and you can find it in Start/Programs/Accessories/Fax menu.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width