Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Cancel Send event of an appointment item causes error to be displayed

Geek News

Cancel Send event of an appointment item causes error to be displayed
GR <grourke[ at ]sonexis.com> 6/21/2007 3:48:34 PM
Hi,

I have an AddIn written in VB that runs in Outlook 2007. I capture the
Send event of an Appointment item and test a local condition. If that
condition is True, I then want to cancel the Send event. I set the
Cancel parameter = True and exit.

This does seem to stop the Send from happening, however I get an error
message ( a yellow box popup over the Outlook icon in the system tray)
that says:
"Could not complete the operation. One or more parameter values are
invalid."


If I comment out the line: "Cancel = True" and do not stop the send, I
don't get the error message.

Any ideas on why this is happening or better yet on how to stop it
from happening?

Thanks!

Here is the code:

Private Sub oAppointmentItem_Send(Cancel As Boolean)
If strVar1 = "Do Not Send" Then
Cancel = True
End If
End Sub

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net