Name$ parameter in CreateRichTextItem

What is the name$ parameter in the LotusScript call CreateRichTextItem? Designer help just says it’s the name of the new rich text item (as a String), but I can’t seem to put anything legal in there. I always get an “Illegal use of PROPERTY” error – unless I name a field already in the doc, in which case I get a “Rich text item _____ already exists” error. What am I missing?

Dim workspace As New NotesUIWorkspace

Dim doc As NotesDocument

Dim rtitem As NotesRichTextItem

Set uidoc = workspace.CurrentDocument

Set doc = uidoc.Document

Set rtitem = doc.CreateRichTextItem( “Link” )

Subject: RE: name$ parameter in CreateRichTextItem

I pasted your exact source code into a button in this very rich text field, and I did not get the error you describe. I think the error is happening on a different line of code that you have not shown us. In case you’re not sure how to find out where, these articles should help: Debugging Domino Applications part 1 and part 2.

Subject: RE: name$ parameter in CreateRichTextItem

Andre, thank you for your response.

You are correct - the error was caused by a different line of code.

The odd thing is that the debugger was reporting this line as the offender, even thought the real problem was 2 lines below it.