PC Review


Reply
Thread Tools Rate Thread

Application.ActiveInspector() is Null on Ribbon Load

 
 
Deepak N
Guest
Posts: n/a
 
      28th May 2009
Is it possible to access the ActiveInspector at the time of ribbon load. Application.ActiveInspector() return proper value when i use custom form but not working for default contact form.

Actually i want to customize ribbon button depending on a property value in ActiveInspector().CurrentItem.
Submitted using http://www.outlookforums.com
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      28th May 2009
Customize the ribbon in what way?

The callback for ribbon XML is made only on the first opening of that type
of Outlook item. So the first time a contact is opened the ribbon callback
is called and you return the XML for a contact item ribbon.

What I'd do would be to handle the Inspector.Activate() event. In the first
Activate() event I'd make a ribbon.Invalidate() call, where ribbon is an
object variable for your IRibbonUI instance.

The Invalidate() call will fire any callbacks you have set up in the XML for
visible and enabled, among other things. You can use those callbacks to get
the ActiveInspector().CurrentItem and read its properties, then decide which
ribbon UI you want to show/hide/enable/disable.

If you have dynamic controls such as a dynamicMenu you can also populate the
control as desired at that point from those callbacks.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Deepak N" <endeep123[at]gmail[dot]com> wrote in message
news:(E-Mail Removed)...
> Is it possible to access the ActiveInspector at the time of ribbon load.
> Application.ActiveInspector() return proper value when i use custom form
> but not working for default contact form.
>
> Actually i want to customize ribbon button depending on a property value
> in ActiveInspector().CurrentItem. Submitted using
> http://www.outlookforums.com


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimized Ribbon on load SF Microsoft Access 0 17th Mar 2010 09:30 AM
Application.ActiveInspector().CurrentItem Returns Wrong(Old) Value Deepak N Microsoft Outlook Program Addins 3 8th Jun 2009 01:55 PM
Selective Ribbon load in 2007 Gordon Microsoft Excel Programming 3 2nd Oct 2008 03:41 PM
Application.ActiveInspector.CommandBars.FindControl(, 360) Type Mismatch Carol Chisholm Microsoft Outlook VBA Programming 8 20th Oct 2005 07:31 AM
Application.ActiveInspector.CurrentItem not set? Simon Shaw Microsoft Outlook VBA Programming 2 3rd Sep 2004 06:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:42 AM.