function doCode(str, oTag, cTag, roTag, rcTag)
tx = split(str, cTag)
t = ""
for i = 0 to ubound(tx)
if lcase(oTag) = "[a]" then
p = instr(1, tx(i), "[a]", 1)
if p <> 0 then
tmp = mid(tx(i), p)
url = mid(tmp, 4)
if lcase(left(url, 5)) = "http:" then
tmp1 = Replace(tmp, "[a]"&url, "<A href='" & url & "' Target=_Blank> & url & </a>", 1, -1, 1)
else
tmp1 = Replace(tmp, "[a]"&url, "<A href='http://" & url & "' Target=_Blank> Länk </a>" , 1, -1, 1)
end if
t =t & Replace(tx(i), tmp, tmp1)
else
t = t & tx(i)
end if
else
cnt = instr(1,tx(i), oTag,1)
select case cnt
case 0
t=t&tx(i) & " "
case else
t = t & Replace(tx(i), oTag, roTag,1,1,1)
t = t & " " & rcTag & " "
end select
end if
next
doCode = t
end function
Hur ska jag få denna "länk" funktion att funka som wF:s?