title: Send one email with all the topics pending for the person
body: <p>I am trying to create a macro where the all pending tasks for one person, one e-mail, will be included in one Outlook e-mail. Basically the program will search for the pending tasks, group them all and send it to the e-mail address of the person it is assigned to.</p>
  <p>I was able to modify/create a code where the pending task reminders are sent automatically, but it is sending one task per e-mail. This floods the person with multiple reminders.</p>
  <p>Is it possible to have one e-mail reminder that includes all the pending tasks for that person?</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Reminder()
      Dim wStat As Range, i As Long
      Dim dam As Object
      
      For Each wStat In Range(&quot;D6&quot;, Range(&quot;D&quot; &amp; Rows.Count).End(xlUp))
          If wStat.Value = &quot;Pending&quot; Then
              i = wStat.Row
              If Cells(i, &quot;I&quot;).Value &lt;= Range(&quot;I3&quot;).Value Then
                  Set dam = CreateObject(&quot;Outlook.Application&quot;).CreateItem(0)
                  dam.To = Range(&quot;L&quot; &amp; i).Value
                  dam.CC = Range(&quot;L&quot; &amp; i).Value
                  dam.Subject = Range(&quot;B&quot; &amp; i).Value
                  dam.Body = &quot;Dear &quot; &amp; Range(&quot;E&quot; &amp; i).Value &amp; &quot;,&quot; &amp; vbCr &amp; vbCr &amp; _
                      &quot;This is to remind you that the task: &quot; &amp; Range(&quot;B&quot; &amp; wStat.Row).Value &amp; &quot; - &quot; &amp; &quot; &quot; &amp; _
                      &quot;is still pending.&quot; &amp; vbCr &amp; vbCr &amp; _
                      &quot;Thank you!&quot;
                  '
                  dam.Send 'change send to display if you want to check
                  wStat.Value = &quot;Pending&quot;
             End If
          End If
      Next
  
      MsgBox &quot;Reminders Sent!&quot;
  End Sub
  </code></pre>
  <p>This is the sample Excel file<br />
  <a href="https://i.stack.imgur.com/f3Mh3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f3Mh3.png" alt="This is the sample excel file" /></a></p>
  <p>This is what it looks like now<br />
  <a href="https://i.stack.imgur.com/v7Kp9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v7Kp9.png" alt="This is what it looks like now" /></a></p>
  <p>This is what I want it to look like<br />
  <a href="https://i.stack.imgur.com/D5O7O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D5O7O.png" alt="This one here is what I want it to look like" /></a></p>