Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Outlook auto reply

Posted on 2003-03-13
Medium Priority
Last Modified: 2010-04-07
Hi People,
I recieve many emails everyday and every one has a standard reply to it.
What I would like to be able to do is auto reply to the email but use specific details from the original email in the reply.

The original mail looks like this,

Name: Phil Johnson
Password: 12345
Location: North East
Username: PhilJ

And what I would like to do is reply to the mail by picking the name and username and inserting it in a specific location in the reply.

So the reply would look

Hi Phil,

You username is PhilJ and your password is 12345.

If you have any further questions please mail at@whatever.



Can any one help me out with this.

cheers guys.
Question by:pnorris98
  • 3
  • 2

Expert Comment

ID: 8129568
Do your incoming mails always have the same format?

Author Comment

ID: 8129692
hi there thanks for getting back so quick,
yes the incoming mails always have the same format.

Expert Comment

ID: 8129894
so you can parse the body property of the mail for the fixed values like Name,Password,Location and Username to get the values. With this values you can create a new reply message with your personalized text. Create a string template of you reply message mit place holders. like this:

Hi <Name>,

You username is <Username> and your password is <Password>.

If you have any further questions please mail at@whatever.


You only have to replace the place holders with the value of the parsed original message using the Replace function.


Author Comment

ID: 8136010
Thanks for that Mesch, but can you explain it in laymans terms for me, my apologies but I am some what of a novice when it comes to things like this.

Accepted Solution

mesch earned 540 total points
ID: 8140241
Okay here is some code that i wrote to test your explanations and extract the users data. You have to select one or more items in you inbox and start the button.
If you need more help drop me a line...

Sub FormattedReply()
Dim oItem As MailItem
Dim strName
Dim strPassword
Dim strLocation
Dim strUserName

For Each oItem In Application.ActiveExplorer.Selection
   'MsgBox oitem.Body
   'Debug.Print InStr(1, oItem.Body, "Name: ")
   strName = Mid(oItem.Body, InStr(1, oItem.Body, "Name: ") + Len("Name: "), InStr(InStr(1, oItem.Body, "Name: ") + Len("Name: "), oItem.Body, vbLf) - (InStr(1, oItem.Body, "Name: ") + Len("Name: ")))
   strPassword = Mid(oItem.Body, InStr(1, oItem.Body, "Password: ") + Len("Password: "), InStr(InStr(1, oItem.Body, "Password: ") + Len("Password: "), oItem.Body, vbLf) - (InStr(1, oItem.Body, "Password: ") + Len("Password: ")))
   strUserName = Mid(oItem.Body, InStr(1, oItem.Body, "Username: ") + Len("Username: "), InStr(InStr(1, oItem.Body, "Username: ") + Len("Username: "), oItem.Body, vbLf) - (InStr(1, oItem.Body, "Username: ") + Len("Username: ")))
   '-- type in the code to reply to the message
   'Debug.Print strName & vbLf & strPassword & vbLf & strUserName

End Sub


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article lists the top 5 trialware OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their Exchange server is no longer available or other critical issues with Exchange server or impo…
MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

580 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