![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I am trying to create a process that allows me to only see new emails
when I want to process them. I am unable to work offline at work as when I try to do this I am not able to even open my outlook. So I have thought of an alternative. I have created a rule that when any new mail comes in, the category for that mail is set to "New Mail". I then have created a view of my inbox that looks for only mail that does not contain this category. What I want to do next, is to create a toolbar button that I will call "Retrieve Mail", that when I click it, will find any email with the category of "New Mail", and remove that category from the item. I don't want to delete all the categories, in case someone has sent me a mail with a category that I want to keep. I just want to find any mail with the category of "New Mail", and remove it. I am using Outlook 2003. Anyone that can share a VBA that does this would be appreciated. Thanks. |
#2
|
|||
|
|||
![]()
Your solution seems unnecessarily complicated for the problem you're trying
to solve. If you need to quickly see items in your Inbox that are unread, or have been delivered today, create a View or a Search Folder using the appropriate filters. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Murphybp2" wrote: I am trying to create a process that allows me to only see new emails when I want to process them. I am unable to work offline at work as when I try to do this I am not able to even open my outlook. So I have thought of an alternative. I have created a rule that when any new mail comes in, the category for that mail is set to "New Mail". I then have created a view of my inbox that looks for only mail that does not contain this category. What I want to do next, is to create a toolbar button that I will call "Retrieve Mail", that when I click it, will find any email with the category of "New Mail", and remove that category from the item. I don't want to delete all the categories, in case someone has sent me a mail with a category that I want to keep. I just want to find any mail with the category of "New Mail", and remove it. I am using Outlook 2003. Anyone that can share a VBA that does this would be appreciated. Thanks. |
#3
|
|||
|
|||
![]()
On Aug 13, 1:16 pm, Eric Legault [MVP - Outlook]
wrote: Your solution seems unnecessarily complicated for the problem you're trying to solve. If you need to quickly see items in your Inbox that are unread, or have been delivered today, create a View or a Search Folder using the appropriate filters. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ "Murphybp2" wrote: I am trying to create a process that allows me to only see new emails when I want to process them. I am unable to work offline at work as when I try to do this I am not able to even open my outlook. So I have thought of an alternative. I have created a rule that when any new mail comes in, the category for that mail is set to "New Mail". I then have created a view of my inbox that looks for only mail that does not contain this category. What I want to do next, is to create a toolbar button that I will call "Retrieve Mail", that when I click it, will find any email with the category of "New Mail", and remove that category from the item. I don't want to delete all the categories, in case someone has sent me a mail with a category that I want to keep. I just want to find any mail with the category of "New Mail", and remove it. I am using Outlook 2003. Anyone that can share a VBA that does this would be appreciated. Thanks.- Hide quoted text - - Show quoted text - Thank you for your response, but I think you may have missed the point. If I were to create a view that showed me unread items, then as I was processing items, new ones would keep popping in as they were recieved, which is what I want to avoid. Same problem if I created a view that showed everything that was delivered today. I'm trying to duplicate the same process that would occur if I was able to work in an offline mode using the "Send/Recieve" option. If I were able to work ofline (which I am not), then when I would hit "Send/Receive" it would send and receive everything at that point. Any new items received would not show until I did the "Send/Receive" again. So I want to duplicate this same type of process. If you have a better solution for doing that, I'm all ears. But just creating views doesn't accomplish that. |
#4
|
|||
|
|||
![]()
Okay, I understand. Then you are on the right track with your proposed VBA
solution. Just filter the Items collection for the Inbox using the Restrict method on the Categories property. Loop through them and use the Replace function to remove the "NewMail" category from the .Category property, which will leave any existing categories untouched. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Murphybp2" wrote: On Aug 13, 1:16 pm, Eric Legault [MVP - Outlook] wrote: Your solution seems unnecessarily complicated for the problem you're trying to solve. If you need to quickly see items in your Inbox that are unread, or have been delivered today, create a View or a Search Folder using the appropriate filters. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ "Murphybp2" wrote: I am trying to create a process that allows me to only see new emails when I want to process them. I am unable to work offline at work as when I try to do this I am not able to even open my outlook. So I have thought of an alternative. I have created a rule that when any new mail comes in, the category for that mail is set to "New Mail". I then have created a view of my inbox that looks for only mail that does not contain this category. What I want to do next, is to create a toolbar button that I will call "Retrieve Mail", that when I click it, will find any email with the category of "New Mail", and remove that category from the item. I don't want to delete all the categories, in case someone has sent me a mail with a category that I want to keep. I just want to find any mail with the category of "New Mail", and remove it. I am using Outlook 2003. Anyone that can share a VBA that does this would be appreciated. Thanks.- Hide quoted text - - Show quoted text - Thank you for your response, but I think you may have missed the point. If I were to create a view that showed me unread items, then as I was processing items, new ones would keep popping in as they were recieved, which is what I want to avoid. Same problem if I created a view that showed everything that was delivered today. I'm trying to duplicate the same process that would occur if I was able to work in an offline mode using the "Send/Recieve" option. If I were able to work ofline (which I am not), then when I would hit "Send/Receive" it would send and receive everything at that point. Any new items received would not show until I did the "Send/Receive" again. So I want to duplicate this same type of process. If you have a better solution for doing that, I'm all ears. But just creating views doesn't accomplish that. |
#5
|
|||
|
|||
![]()
On Aug 14, 1:22 pm, Eric Legault [MVP - Outlook]
wrote: Okay, I understand. Then you are on the right track with your proposed VBA solution. Just filter the Items collection for the Inbox using the Restrict method on the Categories property. Loop through them and use the Replace function to remove the "NewMail" category from the .Category property, which will leave any existing categories untouched. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ "Murphybp2" wrote: On Aug 13, 1:16 pm, Eric Legault [MVP - Outlook] wrote: Your solution seems unnecessarily complicated for the problem you're trying to solve. If you need to quickly see items in your Inbox that are unread, or have been delivered today, create a View or a Search Folder using the appropriate filters. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ "Murphybp2" wrote: I am trying to create a process that allows me to only see new emails when I want to process them. I am unable to work offline at work as when I try to do this I am not able to even open my outlook. So I have thought of an alternative. I have created a rule that when any new mail comes in, the category for that mail is set to "New Mail". I then have created a view of my inbox that looks for only mail that does not contain this category. What I want to do next, is to create a toolbar button that I will call "Retrieve Mail", that when I click it, will find any email with the category of "New Mail", and remove that category from the item. I don't want to delete all the categories, in case someone has sent me a mail with a category that I want to keep. I just want to find any mail with the category of "New Mail", and remove it. I am using Outlook 2003. Anyone that can share a VBA that does this would be appreciated. Thanks.- Hide quoted text - - Show quoted text - Thank you for your response, but I think you may have missed the point. If I were to create a view that showed me unread items, then as I was processing items, new ones would keep popping in as they were recieved, which is what I want to avoid. Same problem if I created a view that showed everything that was delivered today. I'm trying to duplicate the same process that would occur if I was able to work in an offline mode using the "Send/Recieve" option. If I were able to work ofline (which I am not), then when I would hit "Send/Receive" it would send and receive everything at that point. Any new items received would not show until I did the "Send/Receive" again. So I want to duplicate this same type of process. If you have a better solution for doing that, I'm all ears. But just creating views doesn't accomplish that.- Hide quoted text - - Show quoted text - Thank you for your response. I don't know how to write VBA...only copy and paste. Can you send me a sample of what you have recommended? |
#6
|
|||
|
|||
![]()
Okay, I'll bite. :-) The macro below will loop through all e-mails in your
Inbox and remove the NewMail category from all messages. Sub RemoveNewMailCategoryFromMessagesInFolder() On Error GoTo RemoveNewMailCategoryFromMessagesInFolder_Error Dim objNS As Outlook.NameSpace Dim objInbox As Outlook.MAPIFolder Dim objItems As Outlook.Items Dim objItem As Object Dim intX As Integer Set objNS = Application.GetNamespace("MAPI") Set objInbox = objNS.GetDefaultFolder(olFolderInbox) Set objItems = objInbox.Items For intX = 1 To objItems.Count If InStr(1, objItems.Item(intX).Categories, "NewMail", vbTextCompare) 0 Then Set objItem = objItems(intX) objItem.Categories = Replace(objItem.Categories, "NewMail,", "", , , vbTextCompare) objItem.Categories = Replace(objItem.Categories, "NewMail", "", , , vbTextCompare) objItem.Save End If Next Set objNS = Nothing Set objInbox = Nothing Set objItems = Nothing Set objItem = Nothing On Error GoTo 0 Exit Sub RemoveNewMailCategoryFromMessagesInFolder_Error: MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure RemoveNewMailCategoryFromMessagesInFolder of VBA Document ThisOutlookSession" Resume Next End Sub -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Murphybp2" wrote: On Aug 14, 1:22 pm, Eric Legault [MVP - Outlook] wrote: Okay, I understand. Then you are on the right track with your proposed VBA solution. Just filter the Items collection for the Inbox using the Restrict method on the Categories property. Loop through them and use the Replace function to remove the "NewMail" category from the .Category property, which will leave any existing categories untouched. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ "Murphybp2" wrote: On Aug 13, 1:16 pm, Eric Legault [MVP - Outlook] wrote: Your solution seems unnecessarily complicated for the problem you're trying to solve. If you need to quickly see items in your Inbox that are unread, or have been delivered today, create a View or a Search Folder using the appropriate filters. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca Blog:http://blogs.officezealot.com/legault/ "Murphybp2" wrote: I am trying to create a process that allows me to only see new emails when I want to process them. I am unable to work offline at work as when I try to do this I am not able to even open my outlook. So I have thought of an alternative. I have created a rule that when any new mail comes in, the category for that mail is set to "New Mail". I then have created a view of my inbox that looks for only mail that does not contain this category. What I want to do next, is to create a toolbar button that I will call "Retrieve Mail", that when I click it, will find any email with the category of "New Mail", and remove that category from the item. I don't want to delete all the categories, in case someone has sent me a mail with a category that I want to keep. I just want to find any mail with the category of "New Mail", and remove it. I am using Outlook 2003. Anyone that can share a VBA that does this would be appreciated. Thanks.- Hide quoted text - - Show quoted text - Thank you for your response, but I think you may have missed the point. If I were to create a view that showed me unread items, then as I was processing items, new ones would keep popping in as they were recieved, which is what I want to avoid. Same problem if I created a view that showed everything that was delivered today. I'm trying to duplicate the same process that would occur if I was able to work in an offline mode using the "Send/Recieve" option. If I were able to work ofline (which I am not), then when I would hit "Send/Receive" it would send and receive everything at that point. Any new items received would not show until I did the "Send/Receive" again. So I want to duplicate this same type of process. If you have a better solution for doing that, I'm all ears. But just creating views doesn't accomplish that.- Hide quoted text - - Show quoted text - Thank you for your response. I don't know how to write VBA...only copy and paste. Can you send me a sample of what you have recommended? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
change a category for appointment that is in a series | Steve_pctchr | Outlook - Calandaring | 3 | August 29th 07 01:46 AM |
How to change an Outlook category? | Mariel Clemensen | Outlook - Using Contacts | 1 | August 26th 06 07:15 PM |
Change font color by category | zSplash | Outlook - Calandaring | 2 | August 21st 06 06:31 PM |
Change the category of a mail item usinb VB | CGF | Outlook and VBA | 4 | June 14th 06 01:30 PM |
Change a contact category for about 40 contacts - | Susan | Outlook - Using Contacts | 4 | January 26th 06 01:52 PM |