categorizing and Filing sent mail items

Status
Not open for further replies.

smurf2

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
I have a technical question for an outlook macro that I got partially working.

I want to be able to categorize and file an email upon sending. I have got this far: (See Below) right now when I send a new item a Category Dialog opens where I can select my category. (aka: Follow Up)

1) What I need to add is the function to file this sent email in the appropriate folder for that category. (I have tried to run a rule but it will not work in the sent folder) and ;

2) right now it does not work for forwarding or replying to emails only new emails. I would like it to give me this option every time I send an email.

Any help you could give me or anywhere you could point me to go would be very much appreciated.


'Categorize Sent Items
'Place in ThisOutlookSession
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeOf Item Is Outlook.MailItem And Len(Item.Categories) = 0 Then
Set Item = Application.ActiveInspector.CurrentItem
Item.ShowCategoriesDialog
End If
End Sub

End Sub
 

smurf2

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
okay, update...

i am a little closer (I think) unless i am missing something...


but how do I make it work for all items??

this is what i got....


'Categorize Sent Items
'Place in ThisOutlookSession
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim objNS As NameSpace

Dim objFolder As MAPIFolder

Set objNS = Application.GetNamespace("MAPI")

Set objFolder = objNS.PickFolder

If TypeOf Item Is Outlook.MailItem And Len(Item.Categories) = 0 Then
Set Item = Application.ActiveInspector.CurrentItem
Item.ShowCategoriesDialog

End If

Set objFolder = Nothing

Set objNS = Nothing

End Sub
 
Status
Not open for further replies.
Top