I’m grabbing the NotesUIDocument information to paste into Word. But after about 30 interations I get the notorious"Maximum number of memory segments that Notes can support has been exceeded"
dialog box.
The code is pretty straight-forward:
Set ui = ws.EditDocument( False, sdoc )
Call ui.selectall
Call ui.Copy
Call ui.deselectall
Call ui.close
I’ve tried adding this as well:
Declare Function EmptyClipboard Lib “User32.dll” () As Long
…
ec = EmptyClipboard()
but to no avail.
It seems that there is a memory leak or something getting lost that I’m not familiar with.
Your thoughts?
Collin
Subject: ui.copy about 30x yields memory segments error
I don’t have the answer to your question, but Mika Heinonen has writen a routine to copy selected Notes documents as separate Word documents, which is available at this link.http://siipi.com/programming.html?docid=1E2E6CEF6BCDF74AC2256F98005ED89B
See if this helps.
Subject: RE: ui.copy about 30x yields memory segments error
Thanks.Unfortunately that solution does a picture and I’m working to save some embedded formatting (like page breaks).
Collin
Subject: RE: ui.copy about 30x yields memory segments error
I think you might need to use the Delete method to free up memory of Notes objects once you’re done with them.
Subject: RE: ui.copy about 30x yields memory segments error
Tried that.It still fails.
Also tried cascading agents (have the agent only process one document but covering the quantity by running it from another agent) but the situation continues.
Subject: RE: ui.copy about 30x yields memory segments error
your post is short on details. you didn’t show all your code. i can’t tell whether you’re really deleting the right objects/all you could.