outlook and vba

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have made an extra button in outlook 2003 using a macro witch apears
inside the the rightmouse button drop down menu, it apears when I press the
rightbutton in mail and my agenda, but I only want it to apear when an e-mail
is selected.

so my question is is it possible that the button only apears when an e-mail
message is selected ?
 
Am Wed, 19 Apr 2006 23:46:02 -0700 schrieb Greenjedi:

You can check the ActiveExplorer.Selection collection for what items (if
any) it contains.
 
that works only for a bit

I have

If ActiveExplorer.Selection.Item(1).Class = olMail Then

the button now only works in the e-mail but it still apears in the agenda.
 
I think you should treat the BeforeFolderSwitch event, and in it, if the
folder to be switched to contains items of type olMail, then add your button
to the dropdown, otherwise don't (or remove it if it's already there).
Should work!
 
Back
Top