Isolated object variable not set message

Another “object variable not set” issue, but not one I saw in my search. I have one user of R6.0 (September 26, 2002) who gets “object variable not set” everytime she open a particular type of document. If she then tries to open an associated document of a different type (using an action button) she gets this message again and that document will not open. Other members of her team, using the same version client, do not encounter these problems.

I saw one thread that suggested this sort of thing might be caused by the way R6 was installed (the machine previously having had R5). Does anyone have further information about this? Should I advise her to re-install R6? And if so, how should she re-install to avoid the same problem?

Thanks

Subject: more info

Very nice user installed the designer so she could run debugger and tell me where she is getting the “object variable not set”.

It is here -

Set er=ws.Currentdocument.document

Everything looks kosher in the code. er and ws are both dimed and set correctly, and like I said it works for everyone else. BUT that convention “Currentdocument.document” irks me. Does anyone know if this is known to be problematic?

Thanks

Whoops: Finally got her to tell me a critical part of the problem. She wasn’t even opening the record. She was viewing it through the preview pane. (It’s like pulling teeth getting info sometimes). I still don’t know what is happening, but not I can recreate the problem.

Still, any help appreciated.

Thanks

Subject: Now we need a little bit more info.

Where is the code that is executing (PostOpen?)Could you post the entire code for that event?

The reason the form action did not execute was that “er” (assume NotesDocument) was never initialized.

Subject: RE: Now we need a little bit more info.

Thank you, but after editing my last post I went back and searched on “preview pane” and found my answer.

Yes the code was in PostOpen. CurrentDocument had no meaning in the preview pane.

Sub Postopen(Source As Notesuidocument)

Dim session As New notessession

Dim ws As NotesUIWorkspace

Dim er As NotesDocument

Set ws = New NotesUIWorkspace

Set er=ws.CurrentDocument.document

However PostOpen has the parameter Source. You just substitute that for ws.CurrentDocument and it works.

Set er=ws.Currentdocument.document becomes

Set er=Source.document

Thanks for taking a look

Subject: Now we are getting somewhere.

Try this code instead in the PostOpen Event:

Set er = Source.Document

instead of

Set er=ws.Currentdocument.document