Conditionally Display my ToolBar

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
H

Himanshu Upadhyay

thanx Ken Slovak
i used messageclass and EntryId property of CurrentItem.

Regard
Himanshu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top