[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Reply to Name in Outlook Email Body

Posted on 2014-02-26
4
Medium Priority
?
368 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 36

Accepted Solution

by:
Kimputer earned 2000 total points
ID: 39890254
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 22

Author Comment

by:Joseph Moody
ID: 39891619
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 36

Expert Comment

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

replace with:

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

Open in new window

0
 
LVL 22

Author Comment

by:Joseph Moody
ID: 39894781
Thank you so much! You make this look so easy!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Suggested Courses

656 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