I came across this code and modified it based on my needs.
I want to reply to the Outlook email I select/highlight.
Instead of replying to the email I select/highlight in Outlook, it replies to the latest email with same subject line of the email I highlighted.
Sub SendEmail()
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.ActiveExplorer.Selection.Item(1)
Dim OutlookConversation As Object
Set OutlookConversation = OutlookMail.GetConversation
Dim OutlookTable As Object
Set OutlookTable = OutlookConversation.GetTable
Dim OutlookAr As Variant
OutlookAr = OutlookTable.GetArray(OutlookTable.GetRowCount)
Dim OutlookReplyToThisMail As Object
Set OutlookReplyToThisMail = OutlookMail.Session.GetItemFromID(OutlookAr(UBound(OutlookAr), 0))
With OutlookReplyToThisMail.ReplyAll
.Subject = Sheet1.Range("O2") & "_" & .Subject
.HTMLBody = "<p style='font-family:calibri;font-size:13'>" & _
Sheet1.Range("D25") & "<br>" & "<br>" & _
Sheet1.Range("D26") & "<br>" & "<br>" & _
Sheet1.Range("D27") & Signature & .HTMLBody
.Display
End With
End Sub