'过滤HTML字符替换为文字 PrivateFunction ReplaceToText(ByVal Html AsString) Dim i AsInteger Dim CurPosBefore AsLong Dim CurPosEnd AsLong Dim ReplaceTextTMP AsString Dim ReplaceText AsString'替换为该字符 Do ReplaceText ="" CurPosBefore =InStr(1, Html, "<") If CurPosBefore <>0Then 'found < text CurPosEnd =InStr(CurPosBefore, Html, ">") If CurPosEnd <>0Then 'found > text ReplaceTextTMP =Mid(Html, CurPosBefore, CurPosEnd - CurPosBefore +1) IfLen(ReplaceTextTMP) >3Then IfLeft(ReplaceTextTMP, 4) ="<img"Then ReplaceText ="[图象]" EndIf EndIf Html =Replace(Html, ReplaceTextTMP, ReplaceText) EndIf EndIf LoopWhileInStr(1, Html, "<") <>0 Html =Replace(Html, " ", "") ReplaceToText = Html End Function