Michael
>
> The error occurs on the line that starts with lcSubject=THIS.oInbox....
>
I am not sure since it's been a long time I played with outlook. But I assume the Item's collection is zero-based. By that You will have an error as soon as You set
THIS.nCurrentMessageNumber=THIS.oInbox.Items.Count
and later
lcSubject=THIS.oInbox.Items[THIS.nCurrentMessageNumber].Subject
If Your property nCurrentMessageNumber is 1-based, You might need to
lcSubject=THIS.oInbox.Items[THIS.nCurrentMessageNumber -1 ].Subject
instead
just a shot in the dark