Application.ActiveInspector() is Null on Ribbon Load

Status
Not open for further replies.
D

Deepak N

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

"Deepak N" <endeep123[at]gmail[dot]com> wrote in message

news:e48qh413JHA.1716@TK2MSFTNGP03.phx.gbl...
> 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
> https://forums.slipstick.com
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
S HTML Code Embedded in String Within Open Outlook Email Preventing Replace(Application.ActiveInspector.CurrentItem.HTMLBody From Working Outlook VBA and Custom Forms 4
D Application.ActiveInspector().CurrentItem Returns Wrong(Old) Value Outlook VBA and Custom Forms 3
bmtjedi Set objApp = Application Not Working in O365-32bit Using Outlook 1
avant-guvnor Outlook.Application now produces error Outlook VBA and Custom Forms 5
C Custom Application Form send Email to Another User Using Outlook 1
N Select Existing BCM Business Contact in C# application Using Outlook 0
S Using "start application" rule action Using Outlook 2
smokiibear windows security mail application not accepting username and password Using Outlook 0
Y VBA - Application Filedialog Hidden Behind Outlook Using Outlook 0
T Synchronize outlook appointments through web application. Using Outlook 1
O Outlook 2010 Stops Working When Accounting Application Tries To Send eMail Using Outlook 4
C MAPI to access a 64 bit Outlook from a 32 bit application; or access via ODBC Using Outlook 0
K Handling application.quit event Outlook VBA and Custom Forms 8
M VSTO C#: How do I declare an application scope variable? Outlook VBA and Custom Forms 2
E Turn application visibility off Outlook VBA and Custom Forms 2
T Run application from cmd button Outlook VBA and Custom Forms 5
D Outlook 2007 Will Not Send Mail From C# Application Outlook VBA and Custom Forms 7
P Supporting threads in Outlook VBA application Outlook VBA and Custom Forms 1
R vba instantiated internetExplorer.application differs from user la Outlook VBA and Custom Forms 1
K How to disconnect Application.COMAddIns.Item().Object? Outlook VBA and Custom Forms 4
D outlook.exe application error - breakpoint has been reached. fix? BCM (Business Contact Manager) 1
P Drag and Drop mails from Outlook to Clarion6 Application Outlook VBA and Custom Forms 5
J Office application does not match advisory. Why? BCM (Business Contact Manager) 3
L RE: BCM Office Application Issue BCM (Business Contact Manager) 1
R Can calendar be displayed in another Office application? Outlook VBA and Custom Forms 1
P accessing custom task pane with Outlook ActiveInspector Using Outlook 1
B ActiveExplorer return NULL on new Window user login and running Outlook first time Using Outlook 1
S ActiveExplorer return NULL on new Window user login and running Outlook first time Outlook VBA and Custom Forms 19
J NULL Outlook VBA and Custom Forms 6
P Inspector.WordEditor always returns null Outlook VBA and Custom Forms 3

Similar threads

Back
Top