Note item not found

70 pts.
Tags:
Lotus Domino
Lotus Notes
Rich text
Hi all, I have scenario where I need prepend some rich text to existing richtext  item . The Rich text Item already have rich text including the attachements. I also  dont want to tamper the formatting of contents in that rich text item . So to achieve that we are contents in temporary Rich text Item  item1, and then  reset the contents in original rt item , then append temporary Rich text Item contents to original. Following is the code used With Me.Body  Dim docTemp As New NotesDocument(CurrentDatabase )             'store the content of Body in a rt field because of some trouble we had with the bodies containing attachments  Set itemRTTemp = Me.Body.CopyItemToDocument( docTemp,"TempRT" )             Call Me.Document.ReplaceItemValue( .Name, "" ) ' prepend new rich text contents     Call Me.Body.AppendRTItem( itemRTTemp ) The code is working fine for 90% of documents on which this code is running. But for certain documents with attachments (huge or without icons or file extensions), the following error occurs. Note item not found TempRT . When debugged the exception occurring at line number 3. above marked in bold ie when  CopyItemToDocument is called. Provided the above scenario can any body help me out to give best possible solution , which holds good for many different notes clients? Note : I also dont want to detach and re attache attachments . If there is no other way other than detach and attach attachments to rich text item then i will have relook over provide this work around. thanks santosh

Software/Hardware used:
lotus notes ,lotus domino

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Stiletto
    Did you look at the BeginInsert method of the NotesRichTextItem class? Check the example code; it might do what you want.
    3,860 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following