Set OutLookApp = CreateObject("OutLook.application")
Set OutLookMailItem = OutLookApp.CreateItem(0)
With OutLookMailItem
For iCounter = 6 To WorksheetFunction.CountA(Columns(4))
MailDest = ""
If MailDest = "" And Cells(iCounter, 4).Offset(0, -1) = "Send Reminder" Then
MailDest = Cells(iCounter, 4).Value
ElseIf MailDest <> "" And Cells(iCounter, 4).Offset(0, -1) = "Send Reminder" Then
MailDest = MailDest & ";" & Cells(iCounter, 4)
End If
Next iCounter
.To = MailDest
.BCC = "xyz@gmail.com"
.Subject = "Field Start-Up Reminder"
.Body = "Reminder: Start-Up for Project is now required. Please ignore if email if request has already been made."
.Send
End With
Set OutLookMailItem = Nothing
Set OutLookApp = Nothing
I can't the worksheet.Function.CountA (Columns(4)) to work properly. It will run through the entire code without picking up the email that is listed in column 4. I must be missing some Monday detail. Can someone please help me with this???
-Thanks
Set OutLookMailItem = OutLookApp.CreateItem(0)
With OutLookMailItem
For iCounter = 6 To WorksheetFunction.CountA(Columns(4))
MailDest = ""
If MailDest = "" And Cells(iCounter, 4).Offset(0, -1) = "Send Reminder" Then
MailDest = Cells(iCounter, 4).Value
ElseIf MailDest <> "" And Cells(iCounter, 4).Offset(0, -1) = "Send Reminder" Then
MailDest = MailDest & ";" & Cells(iCounter, 4)
End If
Next iCounter
.To = MailDest
.BCC = "xyz@gmail.com"
.Subject = "Field Start-Up Reminder"
.Body = "Reminder: Start-Up for Project is now required. Please ignore if email if request has already been made."
.Send
End With
Set OutLookMailItem = Nothing
Set OutLookApp = Nothing
I can't the worksheet.Function.CountA (Columns(4)) to work properly. It will run through the entire code without picking up the email that is listed in column 4. I must be missing some Monday detail. Can someone please help me with this???
-Thanks