Macro in excel for Automatic reply for sent email

rd123

New Member
Joined
Dec 15, 2016
Messages
10
i am trying to write a macro in excel. the situation is i want to send a follow up mail which is already sent before,the mail is already in my sent items,i need to add up including the first original mail. Is this possible with a macro or VBA in excel? any help is thank full.
thanks in advance. below is the macro where i send a first original mail from excel.now i want to add follow up mail for which i send from this code.
is this possible?
Private Sub Worksheet_Change(ByVal Target As Range) Dim selectedValue As String Dim templateValues As String Dim fileLocation As String Dim personName As String Dim Subject As String
selectedValue = ActiveCell.Formula
On Error GoTo SubEnd templateValues = Application.WorksheetFunction.VLookup(selectedValue, Sheets("Template").Range("A1:A30"), 1, False) fileLocation = Application.WorksheetFunction.VLookup(selectedValue, Sheets("Template").Range("A1:B30"), 2, False) Subject = Application.WorksheetFunction.VLookup(selectedValue, Sheets("Template").Range("A1:C30"), 3, False) personName = Cells(Application.ActiveCell.Row, 6).Value & " " & Cells(Application.ActiveCell.Row, 7).Value
If selectedValue = templateValues Then Call Client_Mails(fileLocation, Subject)
End If SubEnd: End Sub
Sub Client_Mails(fileLocation As String, Subject As String)
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
adding to the question, the replying mail should consist of the original "from" address and subject,date and time
 
Upvote 0

Forum statistics

Threads
1,203,467
Messages
6,055,589
Members
444,800
Latest member
KarenTheManager

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top