A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

outlook and vba



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 20th 06, 07:46 AM posted to microsoft.public.outlook.program_vba
Greenjedi
external usenet poster
 
Posts: 2
Default outlook and vba

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 ?
Ads
  #2  
Old April 20th 06, 08:54 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default outlook and vba

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.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


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 ?

  #3  
Old April 20th 06, 09:07 AM posted to microsoft.public.outlook.program_vba
Greenjedi
external usenet poster
 
Posts: 2
Default outlook and vba

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.

"Michael Bauer" wrote:

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.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


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 ?


  #4  
Old April 20th 06, 12:23 PM posted to microsoft.public.outlook.program_vba
dorutzu
external usenet poster
 
Posts: 4
Default outlook and vba

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!

"Greenjedi" wrote in message
...
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.

"Michael Bauer" wrote:

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.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


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 ?




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with VBA and Outlook ms Outlook and VBA 2 April 21st 06 07:23 PM
Using VBA for Outlook and VBA for Access within Access Sardonic Outlook and VBA 1 March 17th 06 12:34 PM
Send As Property Outlook VBA [email protected] Outlook and VBA 1 March 15th 06 04:12 PM
How to loop through Outlook tasks in VBA Rick Williams Outlook and VBA 2 January 25th 06 07:59 PM
Can I use VBA to activate a hyperlink in Outlook? [email protected] Outlook and VBA 2 January 18th 06 12:57 AM


All times are GMT +1. The time now is 11:26 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.