06-01-20 08:42 AM
Answered! Go to Answer.
08-01-20 01:35 PM
'reply.HTMLBody = Message & vbCrLf & item.HTMLBody Dim ForwardBody as String if HTML = True then reply.BodyFormat = 2 ForwardBody = "*****Original Message*****" & "<br>" & "From: " & item.SentOnBehalfOfName & " [mailto:" & item.SentOnBehalfOfName & "]<br>" & "Sent: " & Format(item.ReceivedTime, "dddd, MMMM dd, yyyy ") &Format(item.ReceivedTime, "h:mm:ss tt") & "<br>" & "To: " & item.To & "<br>Subject: " & item.Subject reply.HTMLBody = MailBody & "<br><br><p>" & ForwardBody & "</p><br>" & item.HTMLBody reply.Display else ForwardBody = "*****Original Message*****" & vbNewLine & "From: " & item.SentOnBehalfOfName & " [mailto:" & item.SentOnBehalfOfName & "]" & vbNewLine & "Sent: " & Format(item.ReceivedTime, "dddd, MMMM dd, yyyy ") & Format(item.ReceivedTime, "h:mm:ss tt") & vbNewLine & "To: " & item.To & vbNewLine & "Subject: " & item.Subject reply.Body = MailBody & vbCrlf & vbCrlf & vbCrlf & ForwardBody & vbCrlf & vbCrlf & item.Body end if
06-01-20 01:28 PM
08-01-20 01:35 PM
'reply.HTMLBody = Message & vbCrLf & item.HTMLBody Dim ForwardBody as String if HTML = True then reply.BodyFormat = 2 ForwardBody = "*****Original Message*****" & "<br>" & "From: " & item.SentOnBehalfOfName & " [mailto:" & item.SentOnBehalfOfName & "]<br>" & "Sent: " & Format(item.ReceivedTime, "dddd, MMMM dd, yyyy ") &Format(item.ReceivedTime, "h:mm:ss tt") & "<br>" & "To: " & item.To & "<br>Subject: " & item.Subject reply.HTMLBody = MailBody & "<br><br><p>" & ForwardBody & "</p><br>" & item.HTMLBody reply.Display else ForwardBody = "*****Original Message*****" & vbNewLine & "From: " & item.SentOnBehalfOfName & " [mailto:" & item.SentOnBehalfOfName & "]" & vbNewLine & "Sent: " & Format(item.ReceivedTime, "dddd, MMMM dd, yyyy ") & Format(item.ReceivedTime, "h:mm:ss tt") & vbNewLine & "To: " & item.To & vbNewLine & "Subject: " & item.Subject reply.Body = MailBody & vbCrlf & vbCrlf & vbCrlf & ForwardBody & vbCrlf & vbCrlf & item.Body end if
24-12-20 12:06 PM
Thanks Ami, that worked.
i know, I am responding way too late 🙂
below is what i used
Dim app = CreateObject("Outlook.Application")
Dim _nameSpace As Microsoft.Office.Interop.Outlook.NameSpace = app.GetNameSpace("MAPI")
Dim item = _nameSpace.GetItemFromID(Entry_ID)
Dim reply = item.Reply
Dim ForwardBody as String
If String.IsNullOrEmpty(Subject) Then
If Left(item.Subject,3) = "RE:" then
reply.Subject = item.Subject
else
reply.Subject = "RE: " & item.Subject
end if
Else
reply.Subject = Subject
End If
If Message_Is_HTML Then
reply.BodyFormat = 2
ForwardBody = "*****Original Message*****" & "<br>" & "From: " & item.SentOnBehalfOfName & " [mailto:" & item.SentOnBehalfOfName & "]<br>" & "Sent: " & Format(item.ReceivedTime, "dddd, MMMM dd, yyyy ") &Format(item.ReceivedTime, "h:mm:ss tt") & "<br>" & "To: " & item.To & "<br>Subject: " & item.Subject
reply.HTMLBody = Message & "<br><br><p>" & ForwardBody & "</p><br>" & item.HTMLBody
reply.Display
Else
ForwardBody = "*****Original Message*****" & vbNewLine & "From: " & item.SentOnBehalfOfName & " [mailto:" & item.SentOnBehalfOfName & "]" & vbNewLine & "Sent: " & Format(item.ReceivedTime, "dddd, MMMM dd, yyyy ") & Format(item.ReceivedTime, "h:mm:ss tt") & vbNewLine & "To: " & item.To & vbNewLine & "Subject: " & item.Subject
reply.Body = Message & vbCrlf & vbCrlf & vbCrlf & ForwardBody & vbCrlf & vbCrlf & item.Body
End If
If Sensitivity = Int(Sensitivity) AndAlso (Sensitivity >= 0 And Sensitivity <= 3)
reply.Sensitivity = Sensitivity
Else
reply.Sensitivity = 0
End If
If Importance = Int(Importance) AndAlso (Importance >= 0 And Importance <= 2) Then
reply.Importance = Importance
Else
reply.Importance = 1
End If
reply.Send