Eike
Member
- Outlook version
- Outlook 2016 32 bit
- Email Account
- Exchange Server
Hi everyone,
i am looking for a macro that will move mails to a specified folder triggered by the press of a button.
There seem to be a lot of macros doing what i want automatically when a mail arrives but i need to trigger it manually.
Situation:
I receive lots of mails from monitoring and ticket systems. I need to look at the Subject line before i move them.
Of course i could create a rule, move them to subfolders and check the subfolders but that has proven unusable. I just don´t check the subfolders often enough over the day no matter how hard i try and might miss important mails for hours.
Solution i am looking for:
- categorize incoming mails via Outlook rule
- macro tied to a button that
- goes through the inbox
- looks for mails of category x
- move mails of category x to a subfolder
- (optional) marks them as read along the way
I´m really no good at vba. So i was unable to glance at some scripts and just deduct how to change them to do what i need here.
I would be really happy if someone could help me out. Also if you have an idea how to do this even without a marco.
I found no way to do this with rules and quick actions without having to do a lot of clicks every time. So really every solution with or without a macro would be great.
Thank you for looking at this post and maybe having an idea about it.
Have a good day everyone,
Eike
i am looking for a macro that will move mails to a specified folder triggered by the press of a button.
There seem to be a lot of macros doing what i want automatically when a mail arrives but i need to trigger it manually.
Situation:
I receive lots of mails from monitoring and ticket systems. I need to look at the Subject line before i move them.
Of course i could create a rule, move them to subfolders and check the subfolders but that has proven unusable. I just don´t check the subfolders often enough over the day no matter how hard i try and might miss important mails for hours.
Solution i am looking for:
- categorize incoming mails via Outlook rule
- macro tied to a button that
- goes through the inbox
- looks for mails of category x
- move mails of category x to a subfolder
- (optional) marks them as read along the way
I´m really no good at vba. So i was unable to glance at some scripts and just deduct how to change them to do what i need here.
Code:
Sub MoveMailToFolder()
Dim Messages As Selection
Dim Msg As MailItem
Dim NSpace As NameSpace
Set NSpace = Application.GetNamespace("MAPI")
Set Messages = Item.restrict category blue <-- syntax wrong, but the general idea would be to create a selection of all mails from category x
If Messages.Count = 0 Then
Exit Sub
End If
For Each Msg In Messages
Msg.Move NS.Folders("Archiv").Folders("MonitoringMails")
Next
End Sub
I would be really happy if someone could help me out. Also if you have an idea how to do this even without a marco.
I found no way to do this with rules and quick actions without having to do a lot of clicks every time. So really every solution with or without a macro would be great.
Thank you for looking at this post and maybe having an idea about it.
Have a good day everyone,
Eike