Solved

Reply to Name in Outlook Email Body

Posted on 2014-02-26
4
348 Views
Last Modified: 2014-02-28
I am not sure if this is possible or not. Our helpdesk will send us plain text emails that come from a generic account. The sixth line of every email has the employee's name in it.

I am looking for a way for me to either reply to the helpdesk email and have the employee's name entered or maybe a way (like a quick step) that will forward the email and paste in the employees name. Either way, their name will auto complete.

The admin who runs the helpdesk won't even consider adding in an email field, using ldap queries, etc...

Any help with this would be wonderful!
0
Comment
Question by:Joseph Moody
  • 2
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
Comment Utility
with alt+f11 add this code:

Sub MailItemContent()
    Dim olItem As Outlook.MailItem
    Dim sText As String

    Set olItem = ActiveExplorer.Selection.Item(1)
    sText = olItem.Body
    Lines = Split(sText, vbCrLf)
    
    Set myOutlook = Outlook.Application
    Set objMailMessage = myOutlook.CreateItem(0)
        With objMailMessage
            .To = Lines(5)
            .Subject = "Email subject"
            .Body = "Email body." 'Msg + Signature?
            .Display
        End With

End Sub

Open in new window


Usage: Select email item, run this code (alt+F8, or make a shortcut to this macro on your toolbar), voila, and open email with the To: field filled with the 6th line of that email.
You can easily see what to adjust (subject, email body) yourself to make it your own.
0
 
LVL 21

Author Comment

by:Joseph Moody
Comment Utility
This is really cool!! Is there a way to grab only part of the 6th line?

The sixth line looks like: Opened By: FirstName LastName.

I would like to grab everything after the "Opened By: "

And thank you again!!
0
 
LVL 35

Expert Comment

by:Kimputer
Comment Utility
Yes, find line 12 in previous code starting with .To =

replace with:

.To = Replace(Lines(5), "Opened By: ", "")

Open in new window

0
 
LVL 21

Author Comment

by:Joseph Moody
Comment Utility
Thank you so much! You make this look so easy!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This video discusses moving either the default database or any database to a new volume.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now