'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<(.|\n)+?>"
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all < and > with < and >
strOutput = Replace(strOutput, "<", "<")
strOutput = Replace(strOutput, ">", ">")
stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing
"Michal A. Valasek" <newsaltaircom.net> wrote in message
> I want to transform text with HTML markup to plain text. Is there some
> simple way how to do it?
> I can surely write my own function, which would simply strip everything> < and >. But if someonew has already written something similar for .NET, I
> would prefer more clever solution, which would try to retain original
> layout, at least paragraphs, hyperlinks etc - something like Outlook does
> when changing HTML to plain text.
> Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url]
> Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url]
> Keeping Freedom safe from Democracy