I am currently using the ‘For Each Email’ activity in Outlook 365 to get ‘CurrentEmail.BodyAsHtml()’ and am trying to replace specific pieces of it with either a tab or a new line to make it easier to use in creating a data table.
After getting the .BodyAsHtml() I am trying to use ‘Modify Text’ and replace the first section with “”.
I am running into the issue where it starts with ‘@"…’ and the Expression Editor will not error out due to the lack of closing “” and the ‘@’. Is there a way I can enclose the string I am trying to find other than “”?
Hello @Gaven_Carta try this like if you want to replace a block of HTML inside the email body then use this cleanBody = CurrentEmail.BodyAsHtml.Replace("YourExactTextHere", "")
And if the text contains quotes then escape them using cleanBody = CurrentEmail.BodyAsHtml.Replace("<div class=""someclass"">", "")
And if it contains line breaks or tabs then use this cleanBody = CurrentEmail.BodyAsHtml.Replace("<br>", Environment.NewLine)