function ChangeFont(original, find, start, before, after)
if original <> "" and find <> "" then
strTmp = ucase(original)
findTmp = ucase(find)
pos = instr(start, strTmp, findTmp)
if pos <> 0 then
original = ChangeFont(left(original, pos - 1) & before & mid(original, pos, len(find)) & after & right(original, len(original) - ((pos - 1) + len(find))), find, pos + len(find) + len(before) + len(after), before, after)
end if
end if
ChangeFont = original
end function
function ChangeFont2(original, find, start, before, after)
tabfind = split(find, " " )
for i = lbound(tabfind) to ubound(tabfind)
original = ChangeFont(original, tabfind(i), start, before, after)
next
ChangeFont2 = original
end function
|