The following event handler copies the contents of a memo field named Notes in the current row to a text file.

function exportMemoButton_onClick

local cFile 

cFile = putfile( "Export memo", "*.txt" ) 

if "" # cFile 

form.rowset.fields[ "Notes" ].copyToFile( cFile ) 

endif