Conditionally Display my ToolBar

  • Thread starter Thread starter Himanshu upadhyay
  • Start date Start date
H

Himanshu upadhyay

Hi

I want to display my toolbar only when user creating New
Mail or Forwarding mail or Replying.
is it possible.....?

Thanx in Advance

Himanshu
 
In the NewInspector event test the Inspector.CurrentItem for the Class of
the item. You can look for olMail. That would give you all opened emails.

You can also hook the ActiveExplorer.Selection collection as an Outlook
Items collection and instantiate a MailItem that is declared WithEvents for
every item in the Selection collection. You'd do that by adding each one to
a wrapper collection that has a special class added to the collection for
each item in the Selection. The class would declare a MailItem WithEvents
and handle the Reply ReplyToAll and Forward events. When the selection was
changed (Explorer.SelectionChange) you would remove any classes whose item
was no longer selected from the wrapper collection and add any newly
selected items that are now in the Selection to the wrapper collection.
 
thanx Ken Slovak
i used messageclass and EntryId property of CurrentItem.

Regard
Himanshu
 
Back
Top