Use ParseFn.Pkg Use MapiDllCalls.Pkg Define ERROR_FILE_NOT_FOUND For 2 // The specified file was not found. Define SE_ERR_FNF For 2 // The specified file was not found. Define SE_ERR_PNF For 3 // The specified path was not found. Define ERROR_PATH_NOT_FOUND For 3 // The specified path was not found. Define SE_ERR_ACCESSDENIED For 5 // The operating system denied access to the specified file. Define SE_ERR_OOM For 8 // There was not enough memory to complete the operation. Define ERROR_BAD_FORMAT For 11 // The .exe file is invalid (non-Win32® .exe or error in .exe image). Define SE_ERR_SHARE For 26 // A sharing violation occurred. Define SE_ERR_ASSOCINCOMPLETE For 27 // The file VO association is incomplete or invalid. Define SE_ERR_DDETIMEOUT For 28 // The DDE transaction could not be completed because the request timed out. Define SE_ERR_DDEFAIL For 29 // The DDE transaction failed. Define SE_ERR_DDEBUSY For 30 // The DDE transaction could not be completed because other DDE transactions were being processed. Define SE_ERR_NOASSOC For 31 // There is no application associated with the given file VO extension. This error will also be returned if you attempt to print a file that is not printable. Define SE_ERR_DLLNOTFOUND For 32 // The specified dynamic-link library was not found. //**************************************************************************** // $Module type: CLASS // $Module name: cExecuteFileFloater // $Author : VO // Created : 01/24/00 @ 3:09 // // Description // // $Rev History // 01/24/00 VO Module header created //**************************************************************************** Class cExecuteFileFloater Is A Mixin //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoExecuteFile // $Author : Vincent Oorsprong // Created : 06/01/99 @ 12:33 // // Description // This method is used to display the enclosure via the Windows extension // methods // // $Rev History // 09/12/99 VO Made it work when files are in different directory // 06/01/99 VO Module header created //**************************************************************************** Procedure DoExecuteFile String sFileName sDirectory sDrive sPath Integer iCurrentItem iRetval Handle hWnd Get Current_Item To iCurrentItem Move ((iCurrentItem / 2) * 2) To iCurrentItem Get Value Item iCurrentItem To sFileName Get Value Item (iCurrentItem + 1) To sDirectory Get Parse_Path sDirectory To sPath Get Parse_Drive sDirectory To sDrive Move (sDrive + sPath) To sDirectory Get Window_Handle To hWnd If (hWnd > 0) Begin Move (ShellExecute (hWnd, "open", sFileName, "", sDirectory, SW_SHOWDEFAULT)) To iRetval If (iRetval <= 32) Begin Send Stop_Box ("The attachment could not be opened\nThe returned error is:" * String (iRetval)) "Open document/file failed" End End End_Procedure // DoExecuteFile //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoCreateExecuteFileFloater // $Author : Vincent Oorsprong // Created : 06/01/99 @ 1:01 // // Description // This method creates the floater object // // $Rev History // 06/01/99 VO Module header created //**************************************************************************** Procedure DoCreateExecuteFileFloater //**************************************************************************** // $Module type: OBJECT // $Module name: oExecuteFileFloater // $Author : VOO // Created : 06/01/99 @ 12:51 // // Description // This object adds the OPEN function to the standard floater // // $Rev History // 06/01/99 VO Module header created //**************************************************************************** Object oExecuteFileFloater Is A FormFloatingPopupMenu Send Insert_Item Msg_None "" 0 Send Insert_Item Msg_DoExecuteFile "Open" 0 End_Object // oExecuteFileFloater Set Floating_Menu_Object To (oExecuteFileFloater (Self)) End_Procedure // DoCreateExecuteFileFloater End_Class // cExecuteFileFloater