PC Review


Reply
Thread Tools Rate Thread

Cancel Send not cancelling

 
 
James Winton
Guest
Posts: n/a
 
      15th Aug 2003
Below is my vb.net code for cancelling the send event if a user property is
empty. The code processes when the Entity value is empty. I have stepped
through the code and can see it set cancel = true. the msgbox pops-up but
it still sends the message. Any ideas.

Private Sub m_olMailItem_Send(ByRef Cancel As Boolean) Handles
m_olMailItem.ItemEvents_Event_Send

Try

If Len(Trim(CType(m_olMailItem.UserProperties("Entity").Value, String))) = 0
Then

Cancel = True

MsgBox("Client No. must be entered before mail can be sent.",
MsgBoxStyle.Information)

End If

Catch ex As System.Exception

MsgBox(ex.Message)

End Try

End Sub


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancelling mail item send is having problem Dhananjay Microsoft Outlook Program Addins 4 29th Aug 2007 02:15 PM
Cancelling mail item send is having problem Dhananjay Microsoft Outlook Program Addins 0 28th Aug 2007 01:06 PM
Send message when cancelling an occurrence of recurring meeting =?Utf-8?B?QnJldHQgTGVlIE1hdmVyaWNr?= Microsoft Outlook Discussion 1 20th Feb 2007 06:10 PM
Cancelling process with Cancel event VM Microsoft C# .NET 1 9th Feb 2004 08:36 PM
Item_Send not cancelling when cancel = true James Winton Microsoft Outlook VBA Programming 1 15th Aug 2003 08:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:45 AM.