![]() |
Home Email me SEARCH |
Monthly Archive
Blogroll
Abbas Lokhandwala
Adeleida
Alan Bell
Alan Lepofsky
Andy Donaldson
Arne Nielsen
Ben Langhinrichs
Ben Poole
Bill Buchan
BlogSphere
Brian Benz
Bruce Elgort
Captain Oblivious
Carl Tyler
Chris Byrne
Chris Coates
Chris Linfoot
Chris Miller
Chris Toohey
Chris Whisonant
Christian Brandlehner
CodeStore
Craig Schumann
Curt Stone
Damien Katz
Declan Lynch
Devin Olson
DomBlog.de
domlike.net
Duffbert
Ed Brill
Fabian Nirman
Ferdy Christant
Gayle Elgort
Grant Bingham
Gregg Eldred
Hassan Voyeau
Heini Schwammerl
Ian Irving
Jack Dausman
Jens-Christian Fischer
Jerry Carter
Johan Känngård
John Mill
John Roling
John Vaughan
Just Enough Governance
Justin Knol
Kathy Sierra
Keith Strickland
Ken Yee
Kevin Pettitt
Kurt Higley
Lance Spellman
Laurette Rynne
Mac Guidera
Matt and Jess
Matt White
Mikkel Heisterberg
Mrs Elsmore
Nathan Freeman
News4Notes
nsftools
OpenNTF Blog
Paul Mooney
PhotoTechno Reflections
Ray Bilyk
Richard Schwartz
Richard Spense
Rob Novak
Rob Wunderlich
Rocky Oliver
Roy Holder
Scott Good
Sean Burgess
Simon Peek
Squirrelly Notes
Stan Rogers
Stephan H. Wissel
Steve Castledine
Susan Bulloch
Taking Notes
Tim Rynne
Tim Tripcony
Tom's Rant
Turtle
Vince Schuurman
Volker Weber
Warren Elsmore
Adeleida
Alan Bell
Alan Lepofsky
Andy Donaldson
Arne Nielsen
Ben Langhinrichs
Ben Poole
Bill Buchan
BlogSphere
Brian Benz
Bruce Elgort
Captain Oblivious
Carl Tyler
Chris Byrne
Chris Coates
Chris Linfoot
Chris Miller
Chris Toohey
Chris Whisonant
Christian Brandlehner
CodeStore
Craig Schumann
Curt Stone
Damien Katz
Declan Lynch
Devin Olson
DomBlog.de
domlike.net
Duffbert
Ed Brill
Fabian Nirman
Ferdy Christant
Gayle Elgort
Grant Bingham
Gregg Eldred
Hassan Voyeau
Heini Schwammerl
Ian Irving
Jack Dausman
Jens-Christian Fischer
Jerry Carter
Johan Känngård
John Mill
John Roling
John Vaughan
Just Enough Governance
Justin Knol
Kathy Sierra
Keith Strickland
Ken Yee
Kevin Pettitt
Kurt Higley
Lance Spellman
Laurette Rynne
Mac Guidera
Matt and Jess
Matt White
Mikkel Heisterberg
Mrs Elsmore
Nathan Freeman
News4Notes
nsftools
OpenNTF Blog
Paul Mooney
PhotoTechno Reflections
Ray Bilyk
Richard Schwartz
Richard Spense
Rob Novak
Rob Wunderlich
Rocky Oliver
Roy Holder
Scott Good
Sean Burgess
Simon Peek
Squirrelly Notes
Stan Rogers
Stephan H. Wissel
Steve Castledine
Susan Bulloch
Taking Notes
Tim Rynne
Tim Tripcony
Tom's Rant
Turtle
Vince Schuurman
Volker Weber
Warren Elsmore
I received a call this morning from a user who was getting the infamous 'Object variable not set' error every time he'd open a certain view.
The culprit? It turned out that he had the preview pane open - only opened a few pixels, but it was open. This meant that Notes was grabbing whatever document happened to be selected, and was opening that document in the very small preview pane. And that meant that the Postopen event of the document's form was invoked. Well for many, many years, I have used a block of code like this in the Postopen event:
OK, I'm lazy I guess. My thought was to declare a few of the very common objects in the global declarations and then instantiate those objects in the Postopen event so that they were available to the rest of the form events. I had never heard of any problem like today's issue. Well after a very short time in the Lotusscript debugger, I could see that the NotesUIWorkspace object does not get set from the preview pane. What I mean is that this line:
Set ws = New NotesUIWorkspace...does not appear to work if the document is being opened in the preview pane. So the solution was simply to set 'uidoc' equal to 'Source', rather than trying to reference the CurrentDocument property of the NotesUIWorkspace object.

Yes, it was a quick fix, and I do need to revisit the code, but I'd thought I'd share...Oh, and if you are someone stuck supporting code I've written, you may want to check my code droppings :-) ...and, of course if I'd followed my own advice there would have been a meaningful and helpful error message instead of the generic one. D'oh!
Comments :
1. Posted by Duffbert09/09/2007 08:42 PM
Being the aforementioned "someone" stuck maintaining your old code, I'll keep an eye out for that.











