DEFINE CLASS xlEvents AS session OLEPUBLIC IMPLEMENTS WorkbookEvents IN "c:\program files\microsoft office\office10\excel.exe" ...However, some users are now running office 2003, which has created a new folder for office ( ...\office11 ). How can I dynamically check for this and IMPLEMENT from the right source? Something like the following (which does NOT work):
DEFINE CLASS xlEvents AS session &&OLEPUBLIC DO CASE CASE DIRECTORY( "c:\program files\microsoft office\office10\" ) IMPLEMENTS WorkbookEvents IN "c:\program files\microsoft office\office10\excel.exe" CASE DIRECTORY( "c:\program files\microsoft office\office11\" ) IMPLEMENTS WorkbookEvents IN "c:\program files\microsoft office\office11\excel.exe" OTHERWISE MESSAGEBOX( 'oops' ) ENDCASE ...thanks,