Jag löste det med följande koder:
Kod:
intMatches = 1
Do Until intMatches = 0
.Pattern = "\'([^\[]*?)[\n]"
Set intMatch = .Execute(dd)
strNewText = .Replace(strNewText,"<span class=""classGray"">'$1"&vbcrlf&"</span>")
intMatches = intMatch.Count
Loop
Set intMatch = Nothing
Kod:
intMatches = 1
Do Until intMatches = 0
.Pattern = "\"([^\[]*?)\""
Set intMatch = .Execute(strNewText)
strNewText = .Replace(strNewText,"<span class=""classGreen"">""$1""</span>")
intMatches = intMatch.Count
Loop
Set intMatch = Nothing
Tack för hjälpen.