To use fax with FWH

To use fax with FWH

Postby damianodec » Sat Jan 05, 2008 6:08 pm

I would like send my fax by FWH
are there any example?
can anybody help me?
thanks
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Postby Rochinha » Sat Jan 05, 2008 7:09 pm

Code: Select all  Expand view  RUN
*
* ----------------------------------------------------------------
*
...
   DEFINE BUTTON ... ACTION WinFaxDDE(oWnd,"c:\autoexec.bat","55-11-6651-1629","","","FAX Comercial","Nome da Emmpresa",;
                  "Teste de envio","","","FAX")
...

Function WinFaxDDE(oWnd,FaxFile,FaxNumber,SendTime,SendDate,FaxName,Company,;
                   Subject,Keyword,BillingCode,Modo)
   DEFAULT FaxFile    := "c:\prova.doc" ,;
           FaxNumber  := "4432-4081"    ,;
           SendTime   := ""             ,;
           SendDate   := ""             ,;
           FaxName    := "FAXKonectiva" ,;
           Company    := "Konectiva"    ,;
           Subject    := "Teste de FAX" ,;
           keyword    := ""             ,;
           BillingCode:= ""             ,;
           Modo       := "Fax"

   if oWinFaxDDE == nil
      oWinFaxDDE:=TDDE():New(OWND,"FAXMNG32","CONTROL")
      oWinFaxDDE:Activate()
      ?MsgInfo( "Ativando o WinFAX" )
   else
      ?MsgInfo( "WinFAX ja esta ativado" )
   endif
   oWinFaxDDE:Execute( "GoIdle" )
   oWinFaxDDE:end()

   oWinFaxDDE1:=TDDE():New(OWND,"FAXMNG32","TRANSMIT")
   oWinFaxDDE1:Activate()

   rec := "recipient("+chr(34)+;
          FaxNumber+chr(34)+","+chr(34)+;
          SendTime+chr(34)+","+chr(34)+;
          SendDate+chr(34)+","+chr(34)+;
          FaxName+chr(34)+","+chr(34)+;
          Company+chr(34)+","+chr(34)+;
          Subject+chr(34)+","+chr(34)+;
          keyword+chr(34)+","+chr(34)+;
          BillingCode+chr(34)+","+chr(34)+;
          modo+chr(34)+")"

   //oWinFaxDDE1:Poke(1,"sendfax",rec)
   //oWinFaxDDE1:Poke(1,"sendfax","attach("+chr(34)+faxfile+chr(34)+")",5)
   //oWinFaxDDE1:Poke(1,"sendfax","SendfaxUI")
   oWinFaxDDE1:Execute( rec )
   oWinFaxDDE1:Execute( 'attach('+chr(34)+faxfile+chr(34)+')' )
   oWinFaxDDE1:Execute( "GoIdle" )
   oWinFaxDDE1:Execute( "SendFaxUI" )
   oWinFaxDDE1:end()

   oWinFaxDDE2:=TDDE():New(OWND,"FAXMNG32","CONTROL")
   oWinFaxDDE2:Activate()
   oWinFaxDDE2:Execute( "GoActive" )
return nil


You need activate XP or Windows 2000/2003 Fax service.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 41 guests