Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
Hi i have the code below where i want the F6.value (located underneath the .HTMLBody and highlighted in BOLD)) to be directly underneath the 2nd of the Replans (highlighted in BOLD), i have tried the CHR and the VBR but they are not working, can you help please?
Code:
Private Sub CommandButton7_Click()
Dim aOutlook As Object
Dim aEmail As Object
Dim rngeAddresses As Range, rngeCell As Range, strRecipients As String
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
aEmail.HTMLBody = "<html>******>" & _
"<p>Hi " & Worksheets("Northants").Range("A1").Value & "</p>" & _
"<p>" & Worksheets("Northants").Range("C6").Value & Chr(9) & Worksheets("Northants").Range[B]("F6").Value[/B] & "</p>" & _
"<table border=""1"", cellpadding=""10"", style=background:""#a6bbde"" >" & _
"<tr>" & _
"<th>Replans:</th>" & "<td>" & Worksheets("Northants").Range("B8").Value & "</td>" & "[B]<th>Replans:</th>[/B]" & "<td>" & Worksheets("Northants").Range("F8").Value & "</td>" & _
"</tr>" & _
"<tr>" & _
"<th>Timeband Slides:</th>" & "<td>" & Worksheets("Northants").Range("B9").Value & "</td>" & "<th>Timeband Extensions:</th>" & "<td>" & Worksheets("Northants").Range("F9").Value & "</td>" & _
"</tr>" & _
"<tr>" & _
"<th>Jobs Unscheduled:</th>" & _
"<td>" & Worksheets("Northants").Range("B10").Value & "</td>" & _
"</tr>" & _
"</table>" & _
"<br>" & _
"<p>" & Me.TextBox2.Value & "</p>" & _
"<p>" & Me.TextBox1.Value & "</p>" & _
"<p>Many Thanks</p>" & _
"<p>Northants and Bucks Jeopardy Manager</p>" & _
"</body></html>"
aEmail.Recipients.Add (Worksheets("Northants").Range("C6").Value)
aEmail.CC = (Worksheets("Northants").Range("C6").Value)
aEmail.BCC = ""
aEmail.Subject = "Weekly " & Range("D1").Value
aEmail.Display
End Sub