Hey Guys, Im trying to create a macros for an application report. the report contains application data and the status if they're expired or not. for each application which is expired, i want to email the whole row of data to the owner and the technician. the names are also in the same row.
Here is what I have so far:
i get the "to" value from the 3rd column of my table and my "cc:" value from the 8th column. but everytime i run this loop, it only puts the people from my first row in outlook every run. and it doesnt put anything in the body for the email.
i am fairly new to vba with outlook, any and all support would be greatly appreciated.
Here is what I have so far:
Code:
or Each cl In Range("PAD[PAD ID]")
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = ActiveCell.Offset(0, 2).Value
.CC = ActiveCell.Offset(0, 7).Value
.BCC = ""
.Subject = "CIO Ticket Automation test"
.HTMLBody = ThisWorkbook.Sheets("PAD").Range("A2:K2").Value
' In place of the following statement, you can use ".Display" to
' display the e-mail message.
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Next cl
i get the "to" value from the 3rd column of my table and my "cc:" value from the 8th column. but everytime i run this loop, it only puts the people from my first row in outlook every run. and it doesnt put anything in the body for the email.
i am fairly new to vba with outlook, any and all support would be greatly appreciated.