LOCAL cDocPath, oApp, aDocFileOriginal[1,5], aDocFileAfter[1,5],cWordPath COPY MEMO mMyMemo TO Temp.DOC cDocPath = FULLPATH('Temp.DOC') cWordPath = '"C:\Program Files\Microsoft Office\Office\WINWORD.EXE"' =ADIR(aDocFileOriginal,cDocPath) && get the file details * * You must specify the complete path to WINWORD and the document * in the command line you use to start Word using an API call or RUN. * You can extract Word's path via the FindExecutable() API call * or by looking up the location in the registry yourself. I'm using * the path in the example only as an example - your copy may not be there * * note - if there are embedded spaces in the path, you have to quote- * encapsulate the path(s) in the command line. It's safe to do * regardless, so I just do it in all cases. Don't do it beforehand * since VFP commands like ADIR() won't accept the path that way * oApp = CREATEOBJ('API_APPRUN',cWordPath + ' "' + cDocPath + '"',,'MAX') * Run Word and don't return control to VFP until it finishes oApp.LaunchAppAndWait() * Release the object - you don't need it any more oApp = '' =ADIR(aDocFileAfter,cDocPath) IF aDocFileAfter[1,3] # aDocFileOriginal[1,3] OR ; aDocFileAfter[1,4] # aDocFileoriginal[1,4] && date/time stamp change APPEND MEMO mMyMemo FROM (cDocPath) ENDIF ERASE (cDocPath)>Maros Klempa