Guys,
PFB the Code I use to send out automated reports to my team. The code works flawlessly. But, I need help with the below.
I am currently sending the email from my official account(email1@company.com). I shared mailbox address in my my outlook(email2@company.com). While I want email1 to be my primary email account I want this report alone to go from email2. I know I can do it manually but that would not be efficient. Do help in this.
Sub adscallout()
'set range
Dim r As Range
Set r = Sheets("pivot").Cells
'loop
For i = 2 To 100
Range("B4").Select
ActiveSheet.PivotTables("PivotTable2").PivotFields("user_login").ClearAllFilters
ActiveSheet.PivotTables("PivotTable2").PivotFields("user_login").CurrentPage = _
Sheet3.Range("A" & i).Value
ActiveWorkbook.EnvelopeVisible = True
With r.Parent.MailEnvelope.Item
.To = Sheet3.Range("B" & i).Value
'.cc = Sheet3.Range("E" & i).Value
.Subject = "REALTIME DA Timeline Metrics : 02-Jul "
'.display
.send
End With
Next i
End Sub