Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLEDispatch error on MAPI close?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
OLEDispatch error on MAPI close?
Miscellaneous
Thread ID:
00450408
Message ID:
00450408
Views:
88
This is an old problem and not extremely critical, but after watching a user have trouble yesterday, I would like to solve it:

When I use an OLE MAPI session to send mail, the user sometimes gets a chance to edit the message. If the user normally just sends, it's fine. But occasionally they decide to Close the Outlook/Exchange message window without sending, and they get the OleDispatch error with Cancel and Ignore. If they hit the "Ignore" button on the error message, it closes fine, but if they hit "Cancel" they get an application crash I can't trap. It's kind of tacky to have to inform users to hit Ignore, after they have crashed the app. Here is the code that completes the send:

oform.Message1.SEND(1)
oform.Session1.signoff

Is there a way to avoid (best solution) or trap the mail window Close error message?
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Next
Reply
Map
View

Click here to load this message in the networking platform