Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Item_Send Cancel

Geek News

Item_Send Cancel
Rog <rog_21[ at ]yahoo.com> 5/3/2006 8:44:18 PM
While in the Item_send Event for an email,
I would like to be able to prevent the email from being sent.
any clues on how to do this without saving and deleting the item?
Thanks,
Rog
Re: Item_Send Cancel
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 5/3/2006 8:49:30 PM
This is in an add-in? You should see in the Send event handler declaration that it supports a Cancel parameter. Set that to False to cancel the send:

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Rog" <rog_21[ at ]yahoo.com> wrote in message news:%23BL3DKvbGHA.3840[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> While in the Item_send Event for an email,
> I would like to be able to prevent the email from being sent.
> any clues on how to do this without saving and deleting the item?
> Thanks,
> Rog
Re: Item_Send Cancel
Rog <rog_21[ at ]yahoo.com> 5/3/2006 9:02:38 PM
Thanks Sue, yes it is an add-in. Do you mean set the Cancel to true?
I have done this and it seems the email still sends...
Any ideas?
Rog

Sue Mosher [MVP-Outlook] wrote:
[Quoted Text]
> This is in an add-in? You should see in the Send event handler declaration that it supports a Cancel parameter. Set that to False to cancel the send:
>
Re: Item_Send Cancel
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 5/3/2006 9:45:49 PM
Yes, I got the logic backwards. Set Cancel to True to cancel the send. If that doesn't work, show enough code to illustrate the problem. Your Outlook version might also be relevant.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Rog" <rog_21[ at ]yahoo.com> wrote in message news:eF2NTUvbGHA.3632[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> Thanks Sue, yes it is an add-in. Do you mean set the Cancel to true?
> I have done this and it seems the email still sends...
> Any ideas?
> Rog
>
> Sue Mosher [MVP-Outlook] wrote:
>> This is in an add-in? You should see in the Send event handler declaration that it supports a Cancel parameter. Set that to False to cancel the send:
>>

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