It's possible for ActiveExplorer.Selection.Count to be 0 and for ActiveExplorer.Selection.Item(1) to be something other than a MailItem. You should take both into account.

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> I've developed some code that will alter the subject line of an email
> message selected in Outlook Explorer view based on a button clicked on
[quoted text clipped - 38 lines]
> Thanks!
> Jeff