- Subject: Re: Change category of original message upon reply
- Author: OutdoorRuss
- Date: 18 Oct 2010
- References:
1
2
3
4
Here's what I ended up with... seems to work great for me. - Russ
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
'Declaration
Dim myItems, myItem, myAttachments, myAttachment As Object
Dim myOrt As String
Dim myOlApp As New Outlook.Application
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim Response As String
On Error Resume Next
'work on selected items
Set myOlExp = myOlApp.ActiveExplorer
Set myOlSel = myOlExp.Selection
'for all items do...
For Each myItem In myOlSel
With myItem
If Not myItem Is Nothing Then
Response = MsgBox("Do you want to mark this message Waiting
For Reply?", vbYesNoCancel, "Category?") = vbYes
If Response = True Then
.Categories = "Waiting For Reply"
.FlagRequest = "Waiting"
.Save
End If
If Response = False Then
.Categories = "Complete"
.ReminderSet = False
.TaskCompletedDate = Date
.Save
End If
End If
End With
myItem.Save
Next
'free variables
Set myItems = Nothing
Set myItem = Nothing
Set myOlApp = Nothing
Set myOlExp = Nothing
Set myOlSel = Nothing
End Sub