"Insufficient Memory" error - BeginInsert method of RichTextNotesItem

Has anyone come across the following error when using the BeginInsert method of RichTextNotesItem please:

“Insufficient Memory”

It occurs when positioning the cursor just before an attachment ie BEFORE any attempt to write a short string at the position.

The error is presented in Notes 6 as well.

Subject: haven’t seen that error before

I searched SPRs but didn’t find any hits. I also just used this method to add text to the beginning of a rich text field which only contained an attachment and did not run into the error.

Subject: Insufficient Memory error

Thanks for that. Here the code I’m using:-

Set atts = rtnav.GetFirstElement(8)

Do While Not atts Is Nothing			

			Call rtitem.BeginInsert(atts, False)

			Call rtitem.AppendText({[attachment "} & atts.Name & {" removed ... (see "Attachments from original document" Section at the bottom of this document.]})

			Call rtitem.AddNewline(1)

			Call rtitem.EndInsert()			

			Set atts = rtnav.GetNextElement(8)

	Loop

Subject: your code works for me

Tested with one then two attachments in the RT field and both times it did not present the error and added your text successfully.

Subject: I don’t understand…

Thanks again Oscar. I don’t understand. It may be something to do with the documents. However, total size including attachments is only about 60 KB - so Insufficient Memory message is strange.

Subject: This is likely not relevant…

  • Could this be the dreaded 64K field limit? I know that’s been “fixed” in a number of places, but I also know that LotusScript still has the limit in various places. The “about 60k” just sets off bells, is all. If this is some internal wonkiness like that, then making the data smaller should make it function.

Just a random connection. Hope it helps…

Subject: Also check out the RTItem.Compact() call. It might help.

Subject: Thanks Eric …

Thanks for the pointer Eric.I had never come across the method before. Will give it a go and let you know how I get on - (may save me my hair)

Subject: Thanks…

Thanks for that David, but it’s since occurred on a 30k document. Don’t I love Notes!