Hi everyone. I just want to ask for some help regarding my problem. [I put every comments that need attention.]
The output should be like this when I run the macro.
VBA Code:
Sub SendReminderEmail()
Dim OutApp As Object, OutMail As Object
Dim Reminder1 As String
Dim Reminder2 As String
Dim Reminder3 As String
Dim Reminder4 As String
Dim Reminder5 As String
'Here is the sample data but in reality this is fetching a data from my confidential excel file and the cell value has a multiple entered data like the data on Reminder1
'I also want to organize it using the first 5 characters like "mm/dd".
Reminder1= "04/07 - To attend meetings" & "04/02 - To attend meetings" & "04/01 - To attend meetings"
Reminder2= "04/06 - To attend church"
Reminder3= "04/03 - To attend family gatherings"
Reminder4= "04/02 - To attend friend gatherings"
Reminder5= "04/13 - To attend sports I like"
'Dim OutApp As New Outlook.Application
'Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strBodyTable = Reminder1 & "<br>" & Reminder2 & "<br>" & Reminder3 & "<br>" & Reminder4 & "<br>" & Reminder5
With OutMail
.To = "Test To"
.Subject = "Test Subject" & " " & TodayDate
.CC = "Test CC"
.Display
.HTMLBody = Replace(strBodyTable, Chr(10), "<br>", , , vbTextCompare) & .HTMLBody
End With
Set OutApp = Nothing
Set OutMail = Nothing
End Sub
The output should be like this when I run the macro.