In R5, there is a limitation/bug when removing attachments from a rich text field, where the bitmap icon is left on the form, even though the attachment is gone. I was hoping with R6 that I could navigate through a rich text field and somehow get rid of the bitmap, or copy all the formatted rich text and put it into a new rich text field, then remove the original one. I looked through the new rich text classes, but I’m not sure where to begin with this. Has anyone tried this? The R5 forum is loaded with threads about the bitmap icon and “Note item not found” issue. I’m hoping someone has tried some trick with R6 for this issue. Thanks in advance! I have some existing documents out there that have these “ghost” icons that need to be exorsized!
Subject: Need help with copying rich text
One method I saw years ago (I haven’t actually played with this myself, so can’t really add more to this!):
Assign the text content of a rich text field containing the ghost icon to a variable
Remove the NotesItem from the document
Re-create the item adding back the text “saved” above
Obviously this has a number of pitfalls (“real” attachments, embedded items, formatting), but it worked in the particular scenario being dealt with.
–
Subject: RE: Need help with copying rich text
Thanks for the response. Yes, I have a method working to extract the text with GetFormattedText, but as you stated, the formatting is lost. The most annoying part of that is carriage returns are lost, pushing all text together. I was hoping that the new rich text classes of R6 could overcome this. I still think they can, but am not sure how to extract the formatted text and place it into a new text field. Time to start experimenting more I guess…
Subject: RE: Need help with copying rich text
ND6 offers a whole lot more – just watch the help examples when it comes to initialising NotesRichTextNavigators, as documented elsewhere in this forum!
–