Problem using OLE when Private Information Cleared

We have a system developed by a 3rd party.

Part of the functionality of this system allows email to be sent via the client. It basically creates a document at the server and then instructs the client to show this document and allows the users to set the recipients, subject etc.

Unfortunately with Notes 6 we are experiencing a problem if the users private information has been cleared.

Basically what happens is that the code makes certain calls and on one of them (as outlined in the code sample below) causes the password prompt to be displayed, but after typing one character into the dialog the call we’re making, OpenDatabase, returns immediately with an error being thrown. the theory we have is that because Notes 6 is more multithreaded aware it is trying to be ‘nice’ to the calling code, but instead it is causing an error.

So the basic question(s) we have.

Is this a known error ?

Is there a better way to code this up ?

Is it even possible to control the Notes 6 client in this way ?

Code Example :

Set objLotusNotes = CreateObject("Notes.NotesUIWorkspace")

Set objSession = CreateObject("Notes.NotesSession")



' the following is from our 3rd party supplier

strDbPath = objSession.GetEnvironmentString("MailServer", True)

strDbName = objSession.GetEnvironmentString("MailFile", True)



' Creates a memo document in the above Lotus Notes database.

Set objDb = objSession.GetDatabase(strDbPath, strDbName)



' Try to create a document given the database object.

Set objDoc = objDb.CreateDocument



' trying this line when Private Information Cleared, i.e. F5 has been pressed, causes

' an error to be thrown on tyoping the first  character into the password dialog box as the function call returns immeditely after that character.

objLotusNotes.OpenDatabase strDbPath, strDbName

Subject: Problem using OLE when Private Information Cleared

You could maybe try initialising the session ?? Newbie to all this but I’ve used similar code from vbscript functions that I call from asp’s that don’t require the Client to be open to work

Dim session As NotesSession
Set session = CreateObject(“Lotus.NotesSession”)
Call session.Initialize(“secretPassword”)

Subject: RE: Problem using OLE when Private Information Cleared

Thanks for the suggestion.

Unfortunately we cannot do that as we never know the password for the user whose machine this is running on.

Testing the use of this method does the same as originally reported, it returns immediately the first character is pressed in the password dialog box, which then causes further errors as no session exists etc.