In the following example, the contents of the memo field notes
are copied to a file called Test.txt. Test.txt is then appended to the contents of the memo field. Finally, the contents of Test.txt replace the current contents of the memo field.
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE employee && Open Employee table
WAIT WINDOW 'Employee notes memo field - press ESC' NOWAIT
MODIFY MEMO notes NOEDIT && Open the notes memo field
COPY MEMO notes TO test.txt && Create test file from memo field
WAIT WINDOW 'TEST.TXT text file - press ESC' NOWAIT
MODIFY FILE test.txt NOEDIT && Open the text file
WAIT WINDOW 'Employee notes now appended - press ESC' NOWAIT
APPEND MEMO notes FROM test.txt && Add contents of text file
MODIFY MEMO notes NOEDIT && Display memo field again
WAIT WINDOW 'Overwrite Employee notes- press ESC' NOWAIT
APPEND MEMO notes FROM test.txt OVERWRITE && Replace notes
MODIFY MEMO notes NOEDIT NOWAIT
DELETE FILE test.txt