PDA

View Full Version : Auto Reply outlook Email



Sarfaraz
03-05-2013, 11:46 PM
I receivie an email on daily basis with a certain words always in the subject "P2C & P2P Shortage" (their may be addition of words before and after prvious text. Which I need to approve on daily basis. I like to do following automatically

Reply to all
message body "Please go ahead"
with file attached in orgional email

I like this code to activate once I open my outlook for all the unread emails of that subject. prepare the email only, I will send this manually after checking participants

I have found a code from the net but it doesn't serve my purpose would be grateful if someone kindly help me

Sub EmailReply()
Dim Reply As Outlook.MailItem
Dim Original As Outlook.MailItem
Set Original = Application.ActiveExplorer.Selection(1)
Set Reply = Original.Reply
Reply.Attachments.Add Original
Reply.Subject = "P2C & P2P Shortage"
Reply.Body = "Please go ahead"
Reply.Display
Reply.Send
End Sub