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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Event Handler for Folder Selected



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 20th 06, 12:17 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default Event Handler for Folder Selected

I found event handlers for regular outlook items, but how do I insert
an event handler for other folders?

I have 2 buttons on a custom toolbar, and several application specific
folders. I need to enable or disable the toolbar buttons depending on
which folder the user selects.

Ads
  #2  
Old May 20th 06, 01:16 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default Event Handler for Folder Selected

Ok, I have an event handler working, but now I am trying to figure out
how to enable/disable toolbar buttons on the fly.

  #3  
Old May 21st 06, 07:45 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Event Handler for Folder Selected

You would need a method to access the CommandBarButton objects that are your
buttons and set their Enabled property True or False as warranted by the
current state.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


wrote in message
ups.com...
Ok, I have an event handler working, but now I am trying to figure out
how to enable/disable toolbar buttons on the fly.


  #4  
Old May 24th 06, 08:37 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default Event Handler for Folder Selected


I created access to the button objects when they are created.
They're not null, but when setting the Enabled property to true, the
buttons remain
grayed out.

  #5  
Old May 24th 06, 09:00 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Event Handler for Folder Selected

Are you getting a valid button object? Is the Enabled property returning an
error?

I've found that especially in WordMail that even if a button object is a
valid object that most of its properties and methods aren't valid even in
the button Click event handler. In those cases I have to actually
reinstantiate the button object using FindControl and then I can set
properties such as Picture and Mask and set visibility and enabled.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


wrote in message
ps.com...

I created access to the button objects when they are created.
They're not null, but when setting the Enabled property to true, the
buttons remain
grayed out.


  #6  
Old May 24th 06, 11:19 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default Event Handler for Folder Selected

The return from the button.Enabled = true is true and button.Enabled =
false is false;

I will try using FindControl instead.

  #7  
Old May 24th 06, 11:44 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Event Handler for Folder Selected

Sure it's the right button in the right Inspector or Explorer?

In my wrapper classes for Inspectors or Explorers I can set Enabled and
Visible true or false based on business logic conditions and it works.

The only time I have to re-instantiate the button objects are in WordMail
Inspectors.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


wrote in message
ups.com...
The return from the button.Enabled = true is true and button.Enabled =
false is false;

I will try using FindControl instead.


 




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
Create a search folder to look at all emails in one folder and selected criteria in other folders [email protected] Outlook - General Queries 1 April 10th 06 10:40 AM
Public Folder Calendar All Day Event Viewing Problem NGCW Outlook - Calandaring 4 March 31st 06 09:34 AM
Outlook Folder - FolderRemove Event Atul Sureka Outlook and VBA 3 February 14th 06 06:08 AM
Outlook Folder Move Event Atul Sureka Outlook and VBA 0 February 13th 06 06:09 AM
Mapi Folder Items ItemChange event is not firing AtulSureka Outlook and VBA 3 February 5th 06 07:25 PM


All times are GMT +1. The time now is 08:39 AM.


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