Varaint does not contain a container?

The code is to access the value of rich text, it shows “Varaint does not contain a container” in line item.Values(0), but item.Values has value when I use debugger to view it. The code works fine for other richh text field. I has compared the rich text properties of “RTItem” and other rich text. It is the same. What is the problem came from?

rich text properties:

Rich text Lite

  • Photos

  • Graphics

  • Attachments

  • Text

The code as below:

Dim item As Variant

Set item = curdoc.GetFirstItem(“RTItem”)

If item.Values(0) <> “” Then

End if

Subject: Varaint does not contain a container?

Based on Domino Designer help, the Values property for a Rich Text Item:“String. The text in the field, rendered into plain text.”

I am guessing that since a string is returned, I think the item.Values is considered a string and you should be able to check it that way ---- no (0) at the end…

Or try cycling through it:

Dim thisValue as string

Forall values in item.Values

thisValue = values

if len(thisValue) <> 0 then

'your code…

end if

End Forall

HTH, Dan