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
 
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.
Similar threads
Thread starter Title Forum Replies Date
T Categorizing different colors for a series of events Using Outlook 0
B Color Categorizing 365 Using Outlook 8
D How to handle filing of emails from an Inbox Subfolder to a specific Public folder Using Outlook 1
Diane Poremsky Filing Outlook Email Messages Using Outlook 0
S Outlook 7 VBA macro for multiple filing Outlook VBA and Custom Forms 1
Q Filing 'Sent' Messages in Outlook 2003 Using Outlook 12
L Error when exporting Sent Mail to Excel Outlook VBA and Custom Forms 6
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
P Search folder: all emails sent to or from a domain Using Outlook 1
L Help: set flag for sent mail to check if received an answer Outlook VBA and Custom Forms 2
S Paperclip icon shows without attachment in email under Sent folder Using Outlook 0
S Sent e-mails roll back to previous draft state Using Outlook.com accounts in Outlook 3
icacream Outlook 2021 Win 10 - Nothing goes in my Drafts or Sent items folders ! Using Outlook 1
S Adding a recipient's column to Sent folder in Outlook 2010 Outlook VBA and Custom Forms 1
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
B IMAP server rejects sent email - cannot deliver messages Using Outlook 2
S How to find emails that I sent that have not received a reply? Using Outlook 7
M Extract "Date sent" from emails (saved to folder using drag and drop) Outlook VBA and Custom Forms 1
R Sent emails show iCloud mail account not the alias Using Outlook 2
L Images not displaying in emails sent to self Using Outlook 2
S Outlook 2016 A Shortcut to recall and delete and sent message. Using Outlook 1
J Names in sent items suddenly show as Bob Smith (bobsmith@sample.com) Using Outlook 3
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 4
D Outlook 2016 Outlook not saving Sent Items Using Outlook 4
A Is there an ID field you can use to pair a reply to the sent email? Outlook VBA and Custom Forms 4
T Changing Sent Items location in Outlook 2019 Using Outlook 0
S Outlook (2016 32bit; Gmail IMAP) - Save sent message to Outllook Folder Outlook VBA and Custom Forms 0
C VBA to prompt for Sent folder destination Outlook VBA and Custom Forms 3
MrMayor SENT mail not reloading to top?? Using Outlook 4
D Mail in Sent Items Gone Using Outlook 12
A calendar invites sent from Microsoft Outlook to Mac Outlook is not working Using Outlook 2
Terry Sullivan E-Mails Sent Using a Group Box Result in 70 Kickbacks Using Outlook 4
GregS Outlook 2016 Sent Mail absent from Sent Mail or Sent Items Folders Using Outlook 4
P Outlook for Mac - emails are not sent out beginning last week Using Outlook 1
J Sent Items Folder NOT Showing Correct From Email Address Using Outlook 0
J Outlook Reply > From > Other Email Address... > Address Not Showing in Sent Items... From Email Outlook VBA and Custom Forms 0
T Column to display which email alias a message was sent to Outlook VBA and Custom Forms 6
GregS Outlook 2016 Sent Items vs Sent Messages Using Outlook 2
N Disable Auto Read Receipts sent after using Advanced Find Using Outlook 4
R Outlook for Mac - Advanced Search and Tracking Sent Emails Using Outlook 0
B Outlook - Mail from safe senders list being sent to Spam Folder Using Outlook 0
N Sent emails not reflected in all IMAP Folders Using Outlook 4
L Outlook/O365 "sent on behalf" behaviour Exchange Server Administration 1
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
H Outlook 2016 sent over 30 copies of an e-mail with attachments Using Outlook 1
W Outlook 2010 some sent items marked unread now (was Ok before) Using Outlook 0
T Outlook converts sent email to txt attachments when sync Using Outlook 0
R VBA for copying sent email to current folder under a shared mailbox Outlook VBA and Custom Forms 17
D Sort Problem with Sent Folders Using Outlook 1
oliv- determine to which address an email has been sent Outlook VBA and Custom Forms 3

Similar threads

Back
Top