I'm trying to search for a piece of text in the body of the email. For example I already read the subject but the body I don't know how to extract that portion that is the red mark of the image Ref:00000
This is code that I have
Dim correo As Outlook.MailItem = Item
SEPARO TODO EL SUBJECT Y BUSCO SIEMPRE LA PALABRA FOLIO Y UN NUMERO CONSECUTIVO
Dim separados As Array = correo.Subject.Split(New Char() {" "c})
correo.BodyFormat = Outlook.OlBodyFormat.olFormatRichText
body = correo.HTMLBody
How can I go through the body and get what I'm looking for?
You could get the body (which doesn't have the HTML noise) and search with a regular expression: