FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with a Memo record
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Problem with a Memo record
Posted: Thu May 28, 2015 04:27 PM
I made a function to save models for email




I have problem when I insert the message ( memo field) in Outlook or another exchange application
because I not have the text I save on my app but



how I can resolve it ?

Perhaps I need to save with different type and How ? ( rtf or html ) how can i save it onto a memo field
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Problem with a Memo record
Posted: Thu May 28, 2015 04:48 PM

Make sure you convert soft CR to hard CR+LF or use memoline() plus CRLF to extract each line into cText you send to email body.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Problem with a Memo record
Posted: Thu May 28, 2015 09:33 PM
Hello,
we use RTF-format. This is working fine for us.
You can try with our exe. This exe is very similar to yours.

http://www.atzwanger-software.com/fw/xBauSteine.zip

This program has also full text search inside the memo field.

Best regards,
Otto
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problem with a Memo record
Posted: Fri May 29, 2015 07:24 AM

But the memo field support rtf format text inside ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problem with a Memo record
Posted: Fri May 29, 2015 08:28 AM

I use

@ 90,110 RICHEDIT aGet[3] VAR MM->MESSAGE of oDlgModelli PIXEL SIZE 100,100

and I tried to usse fonts and other effect

How I can save the MM->MESSAGE ?

I tried with
aget[3]:Saveasrtf()

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Problem with a Memo record
Posted: Fri May 29, 2015 12:07 PM
Silvio,
RTF and Memo-fields for me is working fine.
Maybe you need the most resent Fivewin Version.
Best regards,
Otto



Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problem with a Memo record
Posted: Fri May 29, 2015 04:34 PM
Otto, I not Know how save the the richedit into a memo field

I have a dbf with 3 field
and I cannot use update command

please try it
Code (fw): Select all Collapse
#include "Fivewin.ch"
#include "constant.ch"

#include "richedit.ch"

REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO

Function test()
   Local hDLL  := LoadLibrary( 'riched20.dll' )
   Local oDlgModelli

   Local cDlgTitle  :="Family"
   Local aGet[3]
    Local  nBottom   := 29.2
   Local  nRight    :=  58
   Local  nWidth    :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight   :=  nBottom * DLG_CHARPIX_H
   Local otn

 RddSetDefault( "DBFCDX" )

   Create_Archive_Modelli_mail()

   USE MAILMOD ALIAS MM


   IF MM->(eof())
        MM->(DbAPPEND())
         Replace mm->MAILNAME with "test"
         Replace mm->MESSAGE with "Prova test"
          MM->(DbCommit())
      endif

   MM->(DbGotop())

DEFINE DIALOG oDlgModelli          ;
         SIZE nWidth, nHeight   PIXEL  TRUEPIXEL ;
         TITLE cDlgTitle



      @ 90,110  RICHEDIT aGet[3] VAR MM->MESSAGE of oDlgModelli PIXEL SIZE 100,100   //UPDATE


     @ 10, 5 BUTTON otn prompt "Save"  ACTION SaveMemo(aGet)
 ACTIVATE DIALOG oDlgModelli  centered


      if hDLL != nil
      FreeLibrary( hDLL )
   endif

   return nil



function SaveMemo(aGet)

   aGet[3]:saveasrtf()

 return nil





    static   Function Create_Archive_Modelli_mail()
      Local cDir :=""

    DbCreate(cDir+'mm', {  {'MAILNAME' , 'C',  30,   0} ,;
                      {'SUBJECT'  , 'C',  30,   0} ,;
                      {'MESSAGE'  , 'M',  10,  0}}, 'DBFCDX')

     close all
      use &(cDir+'mm') new
      select mm
      if FILE(cDir+'MailMod.DBF')
         delete file &(cdir+'MailMod.cdx')
         append from &(cdir+'MailMod')
         dbcommitall()
         close all
         delete file &(cdir+'MailMod.dbf')
         delete file &(cdir+'MailMod.fpt')
      endif
      close all
      rename &(cdir+'mm.dbf') to &(cdir+'MailMod.dbf')
      rename &(cDir+'mm.fpt') to &(cDir+'MailMod.fpt')
      close all
    return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion