I intend to reply to the below email keep its existing content. I tried a lot of them. I only succeeded to retain the text[Second image] How do I retain the images and tables? There must be a better way that the community might have tried.
In the xaml you attached, the Body of your reply consists of the header data from the mail received like From, Date, Subject, etc… Nothing like your original example.
If this solution is from below post, it doesn’t work for html templates.
One way is to reply via Vbscript (using Start Process or PowerShell)
Const olFolderInboxItems = 3
Dim Items
Dim objSubject
Dim Arg
Set Arg = WScript.Arguments
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objInbox = objNamespace.GetDefaultFolder(olFolderInboxItems )'Inbox
Set Items = objInbox.Items
Items.Sort "[Received]",True
ReplyEmail(Items)
Sub ReplyEmail(objItems)
For Each objItem in objItems
objSubject = Arg(0) '1st Argument as Subject from Start Process Activity
objsubject = objItem.subject
if Instr(objsubject,objSubject) <> 0 then
Set olReply = objItem.ReplyAll
olReply.HTMLBody = "Hello, Reply from Robot. Thank you. " & vbCrLf & olReply.HTMLBody 'Append Body
olReply.Send
Exit For
end if
Next
End Sub