Outlook 2003 - Email row highlighting

Hi,

Not sure if this is possible but I'd thought I'd ask.  I receive emails from 2 different accounts all collected into the same pot.  If I look at the Internet headers I can clearly see in the To: value which of my email accounts the message has been sent to.  Is there any formatting facility to highlight the row in a different colour for each To: account?

Thanks
Brendan
ellipticalAsked:
Who is Participating?
 
thunder_mooseConnect With a Mentor Commented:
Hi there,

In order for this to work, you'll have to press Alt+F11 in Outlook, then paste this code there:

Sub FlagMessages()

Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olFolder As Outlook.MAPIFolder
Dim olMsg As Outlook.MailItem

Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetSharedDefaultFolder(olApp.Session.CurrentUser, olFolderInbox)

For Each olMsg In olFolder.Items
    MsgBox olMsg.To
    If olMsg.To = "TheAddress" Then
       olMsg.FlagStatus = olFlagMarked
       olMsg.FlagIcon = olGreenFlagIcon
    End If
Next
End Sub

This code will go through your mailbox on the server and look for TheAddress, where TheAddress is the To address exactly as you see it in Outlook. It will flag the message green, but you can change it to whatever you want of course. You can add it as a macro button in Outlook by customizing your toolbar (right click on the right hand side, there's a little arrow, and choose customize, then click macros and drag the sub onto the toolbar. Right click it and rename it).

There's a problem with this of course. Each time you get new mail youl have to run the macro again so it flags it. You'll also need to manually refresh it to see the flag, select then deselect your mailbox.

Well I'm sorry but I'm going home now. I'll check again tomorrow for any comments.

TM


0
 
thunder_mooseCommented:
Hi,

Well I guess there could be a coding solution, but you don't really need one if I understand what you want to do correctly. You want to be able to tell the difference between mail that's sent to one box vs the other one more easily right?

Try this:
1. Open Outlook and go to your inbox
2. Click on View in the menu, go to "Arrange By", and select "To"
3. Click on View and again go to "Arrange By", now select "Show in Groups"

You should have a collapsable folder now for every TO field that each contains the mails sent to your different folders.

Any reason you can't use this?
TM
0
 
ellipticalAuthor Commented:
Thanks TM,

I know what your getting at but I want to keep the messages in date received order as I have it.  I know I can sub sort but it looks messy.  I'll have to code something I guess.

Thanks for the input.

Regards
Brendan
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
thunder_mooseCommented:
Hi,

Well, you can't really do anything in programming that you can't also do in the GUI. So you'd be able to mark messages from one address with a flag for instance, but you wouldn't be able to highlight the entire row, since you can't do that in the GUI either. I don't understand why you say that sorting it into groups would be messy, but okay.

How is your Outlook set up if I might ask? What I mean is, do the messages stay on a remote server or do they get downloaded to your local harddisk and then get erased from the server? The solution would be different depending on the answer. And would flagging the message with say a purple or whatever coloured flag be sufficient?

TM
0
 
ellipticalAuthor Commented:
It's IMAP and yes a coloured flag would be fine.  My mailserver had worldclient a webmail interface which used to highlight in different colours depending on the "To" value.  Unfortunately they dropped that out and said they would put it back in at some later point.

Thanks
Brendan
0
 
ellipticalAuthor Commented:
Hi TM,

Thanks for the input.  I've managed the same job but using the "outlook rules" so it applies it to mail as it arrives.  Your code though inspired me to look into it so I'll accept your answer!  

Thanks again.

Best regards
Brendan
0
 
Michael_CorralCommented:
Yes, just use the rules wizard, this is the easy way.  I can go into detail if you need.

Mike
Michael_Corral
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.