Hi,
II am creating an Excel / Word object (via OLE) and want to open a file. How can I determine that this file is already open by someone ?
Previously opened Excel / Word files.
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Previously opened Excel / Word files.
simply try to open in exclusive mode before
#include "FileIO.ch"
FUNCTION MAIN( cFile )
LOCAL nHandle
nHandle := FOPEN( cFile , FO_EXCLUSIVE )
IF nHandle = -1
? "Error" , FERROR()
ELSE
? "nHandle" , nHandle
FCLOSE( nHandle )
ENDIF
RETURN NIL
#include "FileIO.ch"
FUNCTION MAIN( cFile )
LOCAL nHandle
nHandle := FOPEN( cFile , FO_EXCLUSIVE )
IF nHandle = -1
? "Error" , FERROR()
ELSE
? "nHandle" , nHandle
FCLOSE( nHandle )
ENDIF
RETURN NIL
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it