I have some lotusscript that loops through a list of names, finds their mail server and mail file from their NAB record, opens their mailfile, then does some stuff.
I have a problem with more than 1 user though.
The first users mailfile always opens, however next name in the list causes error:
Error 4296: This database object is already open as [SERVERNAME]!!mail[MAILFILE] on line 65.
So I’ve tried at the bottom of the loop to Set userMailFile = Nothing, but then I get the error:
Error 91: Object variable not set on line 65.
I was hoping that by setting the database object to nothing, I could then re-assign it?
The code FYI on line 65 is simply:
Call userMailFile.Open(mailServer,mailFile)
Does anyone have any tips how I can re-use my mailfile object multiple times in my loop?