willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 929
- Office Version
- 365
- Platform
- Windows
Hello,
I need some help modifying this code.
for the TO portion, I need it to list each email until the end of the data.
for the body portion I need it to copy data from B1 to end of column L based on the last row of data in column B
This pic is just an example (the info goes from column B to L)
Thanks in advance for the help with this modification
I need some help modifying this code.
for the TO portion, I need it to list each email until the end of the data.
for the body portion I need it to copy data from B1 to end of column L based on the last row of data in column B
This pic is just an example (the info goes from column B to L)
Thanks in advance for the help with this modification
VBA Code:
Dim OutlookApp As Object, MItem As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set MItem = OutlookApp.CreateItem(0)
With MItem
.to = 'go to B2 on list and continue till no more data'
.Subject = Sheets("Automatic Emails").Range("Q1")
.Body = Sheets("Automatic Emails").Range("Q2")& vbCrLf & vbCrLf &
'Copy data from B1 to column L (last row of data according to column B) AND
& vbCrLf & vbCrLf & vbCrLf & "[This is an Automated Message - Do not reply]" & vbCrLf & "Quality Department"
.Display
.Send
End With