getting item type

  • Thread starter Thread starter Lars Roland
  • Start date Start date
L

Lars Roland

I have made an outlook addin where the user can select some emails from
the email view and push on a buttton, to do somthing with these
emails. What i want is for my addin to display a warning if the user tries
to click the button on an item that is not an email (a contact, or
something else).

I use Outlook.Application.ActiveExplorer.Selection to get my hands on the
users selection. Can I from this somhow check if the selection is a email
???.




Thanks.
 
Set an Object to each member of the selection collection and check the Class
of the item. It will be an email if olMail class. You can also check for the
folder type and disable your button in the BeforeFolderSwitch event if the
folder is a contacts or whatever folder. That's actually a method that's
used more often.
 

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

Back
Top