Set follow up flag on message in my sent box

I

info

This code sets a follow up flag to message when I send the mail to
specific receiver, it works fine.
But I want to change it so it only set follow up flag on message in my
sent box, not on the email sent to the receiver. Is it possible?

***************
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
' Asks user if they want to set a follow up flag to sent message with
specific receiver
Dim intRes As Integer
Dim strMsg As String
If (Item.To = "Marcus" Or Item.To = "Anna") Then
strMsg = "Do you set a 'red flag/Due 7 days/Follow up' to this
message in Sent Items?"
intRes = MsgBox(strMsg, vbYesNoCancel + vbDefaultButton1, "Set
flag")
Select Case intRes
Case vbNo
'Do nothing
Case vbCancel
Cancel = True
Case vbYes
Item.FlagStatus = olFlagMarked
Item.FlagDueBy = Now + 7
Item.FlagRequest = "Follow up"
End Select
End If
End Sub
***************
 
K

Ken Slovak - [MVP - Outlook]

Trap the ItemAdd event for the Sent Items folder and if the user answered
Yes and the subject matches do it in the ItemAdd event handler.
 
I

info

Thanks, after a while I managed to get it to work...

Another question, is it possible to trap it on domain?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top