function PrepareMsgNote #define NL chr(13)+chr(10) lnFields = fcount() lcTempFileName = "X"+sys(2015)+".tmp" handle = fcreate(lcTempFileName) && Create a temp file && Write header line FOR ix = 1 to lnFields =fwrite(handle, padr(field(ix),10)+':'+TypeConvert(ix)+NL) ENDFOR lnSize=fseek(handle,0,2) =fseek(handle,0,0) lcText = fread(handle, lnSize) && Read file back =fclose(handle) ERASE (lcTempFileName) RETURN lcText FUNCTION TypeConvert && Convert VFP data types to char LPARAMETERS tnField lcType = type(field(ix)) luValue = iif(lcType='G','',eval(field(ix))) DO case CASE lcType = "D" lcValue = dtoc(luValue) CASE lcType = "T" lcValue = ttoc(luValue) CASE lcType = "N" lcValue = padl(luValue,20," ") CASE lcType = "L" lcValue = iif(luValue,"Yes","No") CASE lcType $ "CM" lcValue = luValue OTHERWISE lcValue = "" ENDCASE RETURN alltrim(lcValue)You could use it like :