RTF and GetFormattedtext

I m looking for a string in the ActivityLog RT field. If found i need all the positions in the list whereever it is found.

The problem is I m not able to get all the values (element) in the nitem.Values to search. I think after 36 -38 elements it is truncating the values. Do you know why? and if there is a workaround ?

'// ActivityLog is a RT field

Set nitem = fcdbdoc.GetFirstItem(“ActivityLog”)

'//

Forall v In nitem.Values

positionOfChar = Instr(1,v, searchstring)

If positionOfChar > 0 Or positionOfChar <> Null Then

Redim Preserve nList( iLs ) As Variant

nList(iLs) = v

iLs = iLs + 1

End If

End Forall

Should GetFormattedText method return the text from RTF row by row ?

Subject: RE: RTF and GetFormattedtext

GetFormattedText will return the entire contents of a rich text field as a single string, with – if I recall correctly – CR LF sequences between the lines. You could Split this string to process the elements separately, or just use Instr to locate occurrences of your search string (much faster, unless there are an awful lot of them).