Hi,I am having a lot of problems to hide attachments in a form, in notes client 6.5.
I want to prevent them from appearing on the form (it appears a serie of icons from the attachments below a horizontal line)
when I create the RTF through lotusScript code.
Set ortitem=New NotesRichTextItem(odoc,“aRTF”)
Set oEmbedded = ortitem.EmbedObject( EMBED_ATTACHMENT,“”,filename)
does anyone Know if it’s posible?
I show the names of embedded files in a radiobutton field, and this way, users mark the name of attachment to delete it or to see it. Users don’t want to see the icons.
I have tried to create the rich text field and to hide it form notes 4.6 and later.
This way I get to hide the attachments.
But when I attach and save the document several times, without closing it, I realize that there isn’t the file itself in the RTF.
If I close and open the document again,icon appears. There is an attachment in the document that’s not linked to in a RTF.
So if I try to look for the file in the RTF to delete it:
Set ortitem = odoc.GetFirstItem( " aRTF " )
If ( ortitem.Type = RICHTEXT ) Then
Forall o In ortitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
o.Remove
End If
End Forall
End If
I get an error: type mismatch!! because attachment is in the document but not linked to in a RTF. “ortitem.EmbeddedObjects” is empty.
If I attach, save and close the document,it works fine and Attachments doesn’t appear at bottom of my form!!!
Could avoid users save the document without closing it, but???..I think it’s a poor solution…
Please, any ideas, to resolve this problem? Anyone can help me?
Thanks in advance