How to attch a attachment in RichText Filed in current UiDocument

Hi Friends I have problem in Attachment, when ever a aatchment attch in uidocument through lotus script it is not shown in current uidocument, if u have code in script please help me

Dim ws As New NotesUIWorkspace

Dim rt As NotesRichTextItem

Dim uidoc As NotesUIDocument

Dim pathName As String



pathName$ = "c:\Tas\QuoteSheet"	

Set uidoc=ws.CurrentDocument

Set rt = New NotesRichTextItem(uidoc.Document, "Quotation")

If isfolder(pathName$) Then

	fileName = ws.OpenFileDialog(False, "Import Quotesheet",, "c:\Tas\QuoteSheet")	

Else

	fileName = ws.OpenFileDialog(False, "Import Quotesheet",, "c:\Tas")	

End If

If Isarray(fileName) Then

	Call rt.EmbedObject(EMBED_ATTACHMENT, "", fileName(0))

	Call rt.Update		

	Call uidoc.Refresh		

Else

	Msgbox "Hi:"

End If

Subject: Changes to Rich Text Items accessed via UI

As far as I’m aware, you cannot refresh changes to NotesRichTextItems made in the back-end without closing and re-opening the document. uidoc.Refresh doesn’t update the rich text items into the NotesUIDocument.

See the Designer help entry entitled “Writing in rich text items in LotusScript classes”

Subject: I don’t think Update followed by Reload can work on a new document - it must be saved to the database first.