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

Application.ActiveInspector() is Null on Ribbon Load



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 28th 09, 07:32 AM posted to microsoft.public.outlook.program_addins
Deepak N
external usenet poster
 
Posts: 4
Default Application.ActiveInspector() is Null on Ribbon Load

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
Ads
  #2  
Old May 28th 09, 02:19 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Application.ActiveInspector() is Null on Ribbon Load

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
...
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


 




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
Application.ActiveInspector().CurrentItem Returns Wrong(Old) Value Deepak N Add-ins for Outlook 3 June 8th 09 01:55 PM
Load request form fails: Could not load some objects because they arenot available on this machine [email protected] Outlook - General Queries 1 August 5th 08 10:22 PM
How to check if ActiveInspector is a new eMail Christian Havel Add-ins for Outlook 2 July 9th 07 08:32 AM
How to set background image for ActiveInspector.CurrentItem? Burma Jones Outlook - Using Forms 1 February 20th 06 07:13 AM
How to set background image for ActiveInspector.CurrentItem? Burma Jones Outlook and VBA 1 February 20th 06 07:13 AM


All times are GMT +1. The time now is 10:49 PM.


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.