Hi,
Are you setting the 'active item' before trying to do this? There is another forum where a user has the same error which is explained by not having the active item set before trying to access properties of a tree item. - the selected (highlighted) item is not necessarily the active item, this has to be set manually.
Take a look at the suggestions here and see if this solves the problem. If not then can you post your code so I can see whether there is something missing.
Hope this helps
Hannah
NIUK & Ireland