Page History
...
If function execution fails, you can retrieve a text error message by calling the Get_Status function. For example, to display an error message on the screen, include the following error handling routine in your code:
Code Block |
---|
Get_Status(ErrMsg)
Msg(@window, ErrMsg)
|
See also
Get_Status(), MAPIOpenMail(), MAPISaveMail()
Example
Code Block |
---|
Subroutine DemoMAPIDeleteMail(var) * Delete archived messages $INSERT MAPI_EQUATES Declare Function MAPILogon, MAPIOpenMail, MAPIDeleteMail, | MAPILogoff Declare Subroutine Msg, Get_Status if MAPILogon(session) then if MAPIOpenMail(session, 0, "IPM.Archive", 0, ids) then if MAPIDeleteMail(session, 0, ids) then Msg(@window, "Archived messages deleted") end else Get_Status(display) Msg(@window, display) end end else Get_Status(display) Msg(@window, display) end if MAPILogoff(session) else Get_Status(display) Msg(@window, display) end end else Get_Status(display) Msg(@window, display) end return |