Have to resolve or come up with a work-around for some of our users. Our application has a button "Send Email" that works fine if the user's default mail client is Outlook Express, Eudora, or other simple email clients. It simply opens a new email window, like normal.
If Outlook 2000 -- 2003 is the default mail client, we get this error :
"OLE IDispatch exception code 0 from MAPImessages: Unspecified Failure has occurred. "
Our code for the "Send Email" feature is below:
************************
#DEFINE ERR_NOMAPI_LOC "It does not appear that you have MAPI installed. Mail could not be run."
thisform.logsession = .T.
IF !FILE(GETENV("WINDIR")+"\SYSTEM32\MAPI32.DLL");
AND !FILE(GETENV("WINDIR")+"\SYSTEM\MAPI32.DLL")
MESSAGEBOX(ERR_NOMAPI_LOC)
thisform.logsession = .f.
RETURN .F.
ENDIF
thisform.OLEMSess.signon
***********************************
now, we see that Outlook 2003 on one of our test computers pulls up mapi32.dll from:
C:\Program Files\Common Files\System\MSMAPI\1033\mapi32.dll
? So, is the only option to re-code for that location, or is there a statement that will be more general, to look in \system32 or \1033 for the correct mapi32.dll for the default mail client ?
didn't want to re-code and send out to all users, but will if necessary.
thanks for any help,
ktechit
If Outlook 2000 -- 2003 is the default mail client, we get this error :
"OLE IDispatch exception code 0 from MAPImessages: Unspecified Failure has occurred. "
Our code for the "Send Email" feature is below:
************************
#DEFINE ERR_NOMAPI_LOC "It does not appear that you have MAPI installed. Mail could not be run."
thisform.logsession = .T.
IF !FILE(GETENV("WINDIR")+"\SYSTEM32\MAPI32.DLL");
AND !FILE(GETENV("WINDIR")+"\SYSTEM\MAPI32.DLL")
MESSAGEBOX(ERR_NOMAPI_LOC)
thisform.logsession = .f.
RETURN .F.
ENDIF
thisform.OLEMSess.signon
***********************************
now, we see that Outlook 2003 on one of our test computers pulls up mapi32.dll from:
C:\Program Files\Common Files\System\MSMAPI\1033\mapi32.dll
? So, is the only option to re-code for that location, or is there a statement that will be more general, to look in \system32 or \1033 for the correct mapi32.dll for the default mail client ?
didn't want to re-code and send out to all users, but will if necessary.
thanks for any help,
ktechit