Add file to richtext field

Hi

I have a problem. I need to add a file to a richtext field with LS, here my code:

vtxtFileName = uidoc.FieldGetText(“txtFileName”)

If vtxtFileName <> “” Then

Set RichT = New NotesRichTextItem(uidoc.Document, "soComentSolDis" )

Set object = RichT.EmbedObject _( EMBED_ATTACHMENT, "", vtxtFileName)

End If

It add my file, but at document bottom, and I need to add it at richtext field (RichT). Can somebody help me please?

Thanks in advanced.

Regards

Subject: Add file to richtext field

Hi Jorge

As you want to keep the attachments icons int he rt field.,you can go with following steps:

1.Create one computed for display hidden field with name $V2AttachmentOptions

and value “0”

2.Create one computed text side to the richtext field and keep the following

formula for that one is

@LowerCase(“br><a href='/”+DbPath+“/”+@Text(@DocumentUniqueID) +

“/$File/”+@AttachmentNames+“’ target=‘_blank’>”+ @AttachmentNames +“]”)

replace DbPath with ur dbpath name