There is a bug in Lotuscript code which should be fixed by the developer (if you're a user, complain; if you're a developer, read on). The quickest way to find the problem is do a File/Tools/DebugLotuscript, then run the code again. You will be brought to the exact line you are having the problem on. Look at all the variables for that line; one of the variables is not an object. The object you are accessing is probably not an object because you forgot to set it or had an error setting it.