|
|
Function DeleteFormat(ByVal z As String) As String Dim x As Object, y As Object Dim i As Long Set x = CreateObject("VBScript.RegExp") x.Global = True x.Pattern = "<.*?>" Set y = x.Execute(z) For i = 0 To y.Count - 1 z = Replace(z, y(i), " ") Next Do While InStr(z, " ") > 0 z = Replace(z, " ", " ") Loop DeleteFormat = Trim(z) End Function, CreateObject("VBScript.RegExp").
http://www.sql.ru/forum/1094505/funkciya-dlya-formatirovaniya-polya-memo