“Liking” Outlook Messages


I’ve run across several tweets commenting on how it’d be nice if you could like an Outlook message, or wishing that Microsoft would add the ability to like a message. Here’s an example from a gentleman named Brad Snowder (@Skywise88 on Twitter).

Dear Microsoft. When I view my Outlook Inbox there are messages I don’t want to respond to, but if I could just click “like” instead. Thanks

I responded to Brad’s tweet asking him what he saw as the benefit of liking a message and how he envisioned that working. Brad replied

I don’t know, maybe the sender would see that I liked and then like that I liked it, and so on ad infinitum.

I have to confess that I’m not clear on the usefulness or value of liking an email. When you like something on Facebook, or another social network, it goes on your timeline and your followers all see it. If you’ve liked something they aren’t familiar with, then the fact that you’ve approved of it may prompt them to have a look. Perhaps it was an article you liked, so they go read it. Or perhaps they had already read the article, so they respond back asking what you liked most about the article thus starting a conversation. The point of liking something on a social network is to deepen the connection between you and your followers. It’s different for email.

Liking an email is totally different, especially if it was just between you and one other person. Unlike on a social network, your like of an email isn’t going to be seen by your followers. It’s only going to be seen by the other person, or perhaps everyone the message was addressed to if the like is broadcast to all recipients. Even if your like was seen by others, unless they also received the message they wouldn’t have any idea what the message contained or what it was you liked about it. Liking an email may deepen the connection between you and the person you’re corresponding with, but it seems unlikely to me that it will have the same impact a like on a social network has. Another con is that these email likes will add to the amount of mail in everyone’s inbox.

Personal feelings aside, creating a macro for liking an email (which in this context means sending a message back to the sender telling them that you liked their message) is easy enough. All that’s required is generating and sending a response to the sender of the message that says “I liked your message”. Automating the process means you can send a like with a click or two (depending on how you set the macro up to work). For the purpose of this post I’m also including the ability to dislike a message. I’ve always disagreed with Facebook’s approach of only liking things. Disliking something is just as valid as liking it.

The code works by grabbing the current message (which is either the open message or the currently selected message), creating a reply, adding “Like” or “Dislike” to the subject line, replacing the body with a thumbs-up or thumbs-down graphic, and sending the message on its way. The graphics I’m linking to in my sample code are on a site called psdGraphics. I found the graphics via a Google search and thought they looked nice. There were also matching thumbs-up and thumbs-down which I needed. If you decide to use this code, then PLEASE DO NOT continue to link to them unless you contact psdGraphics and get their permission to do so. It’s not fair to psdGraphics to use their bandwidth in a production setting without their permission. I don’t mind using them in a demonstration setting because there won’t be that many connections to their site and the traffic that does go there might be beneficial to them (i.e. it introduces you, the reader, to their graphics offerings).

Add the Code to Outlook.

  1. Start Outlook
  2. Press ALT+F11 to open the Visual Basic Editor
  3. If not already expanded, expand Microsoft Office Outlook Objects
  4. If not already expanded, expand Modules
  5. Select an existing module (e.g. Module1) by double-clicking on it or create a new module by right-clicking Modules and selecting Insert > Module.
  6. Copy the code from the code snippet box and paste it into the right-hand pane of Outlook’s VB Editor window
  7. Edit the code as needed. I placed a comment where changes can occur.
  8. Click the diskette icon on the toolbar to save the changes
  9. Close the VB Editor
Sub LikeMessage()
    'Set LIKE_TO_ALL on the next line.  A value of False will send the like to the sender.  A value of True will send the like to all message addressees.
    Const LIKE_TO_ALL = False
    Dim olkOrig As Outlook.MailItem, olkRply As Outlook.MailItem
    Select Case TypeName(Application.ActiveWindow)
        Case "Explorer"
            Set olkOrig = Application.ActiveExplorer.Selection(1)
        Case "Inspector"
            Set olkOrig = Application.ActiveInspector.CurrentItem
    End Select
    If LIKE_TO_ALL Then
        Set olkRply = olkOrig.ReplyAll
    Else
        Set olkRply = olkOrig.Reply
    End If
    With olkRply
        .Subject = "Like--> " & olkOrig.Subject
        .BodyFormat = olFormatHTML
        .HTMLBody = "<table width=""100%"">" _
                  & "<tr><td style=""text-align:center; font:bold 30pt Tahoma"">I really liked your message!</td></tr>" _
                  & "<tr><td style=""text-align:center""><img src=""http://www.psdgraphics.com/file/thumbs-up.jpg"" height=""512"" width=""640"" /></td></tr>" _
                  & "</table>"
    End With
    olkRply.Send
    Set olkOrig = Nothing
    Set olkRply = Nothing
End Sub

Sub DislikeMessage()
    'Set LIKE_TO_ALL on the next line.  A value of False will send the like to the sender.  A value of True will send the like to all message addressees.
    Const LIKE_TO_ALL = False
    Dim olkOrig As Outlook.MailItem, olkRply As Outlook.MailItem
    Select Case TypeName(Application.ActiveWindow)
        Case "Explorer"
            Set olkOrig = Application.ActiveExplorer.Selection(1)
        Case "Inspector"
            Set olkOrig = Application.ActiveInspector.CurrentItem
    End Select
    If LIKE_TO_ALL Then
        Set olkRply = olkOrig.ReplyAll
    Else
        Set olkRply = olkOrig.Reply
    End If
    With olkRply
        .Subject = "Dislike--> " & olkOrig.Subject
        .BodyFormat = olFormatHTML
        .HTMLBody = "<table width=""100%"">" _
                  & "<tr><td style=""text-align:center; font:bold 30pt Tahoma"">I didn't liked your message!</td></tr>" _
                  & "<tr><td style=""text-align:center""><img src=""http://www.psdgraphics.com/file/thumbs-down.jpg"" height=""512"" width=""640"" /></td></tr>" _
                  & "</table>"
    End With
    olkRply.Send
    Set olkOrig = Nothing
    Set olkRply = Nothing
End Sub

Using the Code.

  1. Select or open a message
  2. Run the LikeMessage macro to send a like or the DislikeMessage macro to send a dislike

Running with a single click.

You can add toolbar buttons (Outlook 2003) or QAT buttons (Outlook 2007/2010) to run the macros with a single click. Here’s a link to a page that explaining how to do both.

Advertisements

4 comments on ““Liking” Outlook Messages

  1. Hi David,

    I get an error on the following line:
    objFM1.FolderToWatch OpenOutlookFolder(“Mailbox – OPS Scheduler\Inbox”)

    How do I ensure I have the proper mapping?

    Thanks,
    Ron

    • LOL. I guess my sarcasm detector wasn’t working at the time. And you weren’t the first person I’d run across on Twitter who seemed interested in liking an email. I suppose it might be possible to +1 an email. You could build a webpage view of the email on the fly with the +1 button embedded and click it manually or perhaps click it via code. I’m not sure how well that’d work though since I’m pretty sure that +1-ing a page links to the URL and in this case the URL is to a transient page (i.e. it wouldn’t exist anymore after you’d +1’d it). A perhaps better solution would be to save the email to a web server in .html format thereby making it available after the +1 process is over. You’d be permanently exposing the email to the internet, which sounds like a bad idea, but that’d be up to you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s