Thanks for all the help! This is how I resolved my export problem.
----- export.prg -----------------------------------------
fpath="C:\webpages\memofoxpro\momed\"
fname="export.txt"
SET DEFAULT TO &fpath
foofighter= Fcreate(fname)
USE memodatatmp
SCAN
&& write id and date
expstr='"'+ALLTRIM(id)+'"*'+'"'+date+'"*'
=FWRITE(foofighter,expstr)
&&write subject
expstr='"'+STRTRAN(STRTRAN(ALLTRIM(subject),'*',''),'~','')+'"*"'
=FWRITE(foofighter,expstr)
&&write body
cntr=MEMLINES(body)
FOR i=1 TO cntr
bodym=MLINE(body,i)
expstr=STRTRAN(STRTRAN(ALLTRIM(bodym),'*',''),'~','')
=Fputs(foofighter,expstr)
endfor
&&write filename
expstr='"*"'+ALLTRIM(filename)+'"~'
Fwrite(foofighter,expstr)
ENDSCAN
FCLOSE(foofighter)