Problem with a Memo record

Problem with a Memo record

Postby Silvio.Falconi » Thu May 28, 2015 4:27 pm

I made a function to save models for email

Image


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

Image

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with a Memo record

Postby Gale FORd » Thu May 28, 2015 4: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.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Problem with a Memo record

Postby Otto » Thu May 28, 2015 9: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Re: Problem with a Memo record

Postby Silvio.Falconi » Fri May 29, 2015 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with a Memo record

Postby Silvio.Falconi » Fri May 29, 2015 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with a Memo record

Postby Otto » 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

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Re: Problem with a Memo record

Postby Silvio.Falconi » Fri May 29, 2015 4: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: Select all  Expand view

#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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 30 guests