Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,227
- Office Version
- 2010
- Platform
- Windows
Hi good afternoon please can you help me with the code below, i am trying to put a border/table around the body of the listbox that gets added into the email if you can help please? this is the code i have below.
VBA Code:
Private Sub CommandButton11_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "test@gmail.com"
.subject = "Chaser"
.Body = Me.ListBox2.Column(1) & ", " & Me.ListBox2.Column(2) & ", " & Me.ListBox2.Column(3) & ", " & Me.ListBox2.Column(4) & ", " & Me.ListBox2.Column(5)
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Last edited: