auto email based on criteria thru outlook

robert jr

New Member
Joined
May 1, 2013
Messages
7
Hello,

I have a simple macro based on specific criteria, the macro works but when populating the email, only one populates with all of the correct criteria. Am I missing a setting in the code?

Dim r As Integer
Dim m As Long
m = Cells(Rows.Count, 1).End(xlUp).Row
For r = 4 To m
If Cells(r, 11) = "Send Reminder" Then
ActiveWorkbook.FollowHyperlink "mailto:" & Cells(r, 2) & _
"?Subject=Overdue Procedures or within 10 days of Being Due&Body=Dear " & _
Cells(r, 14) & ", Procedure Last Reviewed " & _
Cells(r, 9) & "Procedure Name" & Cells(r, 5) & "."
End If
Next r
End Sub

When running the first record that meets the criteria is looks good. Dear robert, Procedure Last Reviewed 3/24/2015Procedure NameProactive Price Documentation - Pricing Documentation to External Customers. But the next record that meets the criteria only has partial data in the body - Dear robert, Procedure Last Reviewed 3/6/2015Procedure NameReview (missing the complete procedure name.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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