G
Guest
Hello all
I have the following code below from Ron De Bruin's website. What i want is to alter it slightly so that... for example... If i am on Cell C3 and it contains "(e-mail address removed)" and i run the macro, it will email (e-mail address removed) with a generic message. Another example, if I am on cell C4 and it conaitns the text "(e-mail address removed)" it will send the generic text email to (e-mail address removed). Any ideas
Sub TestFile2(
Dim olApp As Outlook.Applicatio
Dim olMail As MailIte
Dim cell As Rang
Application.ScreenUpdating = Fals
Set olApp = New Outlook.Applicatio
If cell.Offset(0, 1).Value <> "" The
If cell.Value Like "*" And cell.Offset(0, 1).Value = "yes" The
Set olMail = olApp.CreateItem(olMailItem
With olMai
.To = cell.Valu
.Subject = "Reminder
.Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine & vbNewLine &
"Generic Email Message Here
.Send 'Or use Displa
End Wit
Set olMail = Nothin
End I
End I
Set olApp = Nothin
Application.ScreenUpdating = Tru
End Su
I have the following code below from Ron De Bruin's website. What i want is to alter it slightly so that... for example... If i am on Cell C3 and it contains "(e-mail address removed)" and i run the macro, it will email (e-mail address removed) with a generic message. Another example, if I am on cell C4 and it conaitns the text "(e-mail address removed)" it will send the generic text email to (e-mail address removed). Any ideas
Sub TestFile2(
Dim olApp As Outlook.Applicatio
Dim olMail As MailIte
Dim cell As Rang
Application.ScreenUpdating = Fals
Set olApp = New Outlook.Applicatio
If cell.Offset(0, 1).Value <> "" The
If cell.Value Like "*" And cell.Offset(0, 1).Value = "yes" The
Set olMail = olApp.CreateItem(olMailItem
With olMai
.To = cell.Valu
.Subject = "Reminder
.Body = "Dear " & cell.Offset(0, -1).Value & vbNewLine & vbNewLine &
"Generic Email Message Here
.Send 'Or use Displa
End Wit
Set olMail = Nothin
End I
End I
Set olApp = Nothin
Application.ScreenUpdating = Tru
End Su