Fax using Visual Foxpro

Is there anyone who knows how to fax a word document inside Visual Foxpro.

Thank you

Rolly



Answer this question

Fax using Visual Foxpro

  • Stiny

    Hi Dave,

    Tried your code and got an unspecified error at the RESULT=objDocument.Send()
    line.

    i've tried a couple of things without luck.

    any ideas would be appreciated.

    thx


  • shart

    I do faxing with Windows XP.
    You might need to add SETUP FAXING in Faxes and Printers.

  • TungNguyen


    FAX_SERVER = "\\server02" &&name of fax server
    FAX_NUMBER = faxespending.faxnumber &&number or fax recipient
    SENDER_NAME = faxespending.sendername &&name of sender (not requierd)
    DISPLAY_NAME = faxespending.displayname && (not requierd)
    mfile=SYS(2003)+'\fax.txt'
    DOCUMENT_LOCATION = mfile &&document location
    IF !EMPTY(FAX_NUMBER) AND !EMPTY(DOCUMENT_LOCATION)
    ***
    objFax = CreateObject("FaxServer.FaxServer")
    objFax.Connect(FAX_SERVER)
    objDocument = objFax.CreateDocument("Fax Document")
    objDocument.FileName = DOCUMENT_LOCATION
    objDocument.DisplayName = DISPLAY_NAME
    objDocument.SenderCompany = SENDER_NAME
    objDocument.FaxNumber = FAX_NUMBER
    RESULT=objDocument.Send()
    objFax.Disconnect()
    **
    endif

    Any windows server on you network with the faxing service installed and modem can be the faxing server.

    If you are faxing TXT documents make sure notepad and not WordPad is the default TXT viewer (or is it visa versa…)

    Dave M.




  • Phenom7413

    Dear Dave M.,

    Thank you very much for your quick reply. I will try this now.

    The Lord will bless you for helping others.

    Cheers

    Rolly Militar


  • Fax using Visual Foxpro