FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To use fax with FWH
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
To use fax with FWH
Posted: Sat Jan 05, 2008 06:08 PM

I would like send my fax by FWH
are there any example?
can anybody help me?
thanks

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
To use fax with FWH
Posted: Sat Jan 05, 2008 07:09 PM
*
* ----------------------------------------------------------------
*
...
   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.

Continue the discussion