redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,577
- Office Version
-
- 365
- Platform
-
- Windows
Hi all
I have following code that sends email using VBA
How can the Email Body field be changed so instead of showing "test" it copies a range found in Sheets("info").Range("A1:A15") ??
thanks in advance
I have following code that sends email using VBA
Code:
Sub send()
Dim aOutlook As Object
Dim aEmail As Object
Recip = Sheets("email info").Range("A15").Value
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
'Set Subject
aEmail.Subject = Recip
'Set Body for mail
aEmail.Body = "test"
'Set Recipient
aEmail.To = "xxxxxx@hotmail.com"
'Send Mail
aEmail.send
MsgBox "Email has been sent"
End Sub
How can the Email Body field be changed so instead of showing "test" it copies a range found in Sheets("info").Range("A1:A15") ??
thanks in advance