?
Solved

Outlook auto reply

Posted on 2003-03-13
5
Medium Priority
?
436 Views
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.
ie

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.

Thanks

me.

Can any one help me out with this.

cheers guys.
0
Comment
Question by:pnorris98
[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
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

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

Author Comment

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

Expert Comment

by:mesch
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.

Thanks

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

0
 

Author Comment

by:pnorris98
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.
0
 
LVL 4

Accepted Solution

by:
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
Next

End Sub



0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

752 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