cancel
Showing results for 
Search instead for 
Did you mean: 

Get text from html element

GaryMannion
Level 2
Hi All, 

I have a data item with both html and text that I read in from the Body of an email on a CRM system (Genesys). I need to remove the html and leave just text. Can this be done?

Kind Regards,
Gary
1 REPLY 1

PvD_SE
Level 12
Hi Gary

Without the benefit of an example of your email text, I'd probably do the following:
  • First find the end position of the HTML start-tag for the text you want to extract from your data item using the InStr() function.
  • Then you determine the start position of the HTML end-tag for the text, again with the InStr() function.
  • Finally you use the Mid() function to extract the text between the found positions

Happy coding!
---------------
Paul
Sweden
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)