Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: IRibbonExtensibility and specific folders

Geek News

IRibbonExtensibility and specific folders
"Michael Tissington" <mtissington[ at ]newsgroup.nospam> 1/16/2007 10:25:14 PM
I have implemented IRibbonExtensibility but how can I only load the ribbon
when the Outlook form is from a specific folder or message class (we have an
ECE that does this for pre 2007)

The RibbonID does not seem to reflect the actual message class.


Re: IRibbonExtensibility and specific folders
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/16/2007 11:03:00 PM
If I remember correctly, you should be able to specify the ribbon visiblity
callback, which will be called each time a ribbon is shown.
You might want to post in microsoft.public.outlook.program_addins and/or
microsoft.public.developer.outlook.addins.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Michael Tissington" <mtissington[ at ]newsgroup.nospam> wrote in message
news:%23xuEw0bOHHA.4720[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
>I have implemented IRibbonExtensibility but how can I only load the ribbon
>when the Outlook form is from a specific folder or message class (we have
>an ECE that does this for pre 2007)
>
> The RibbonID does not seem to reflect the actual message class.
>


Re: IRibbonExtensibility and specific folders
"Michael Tissington" <mtissington[ at ]newsgroup.nospam> 1/16/2007 11:16:10 PM
Thanks, have you been able to connect your ece to the class containing the
ribbon code ?

"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
news:uE5qCJcOHHA.4172[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> If I remember correctly, you should be able to specify the ribbon
> visiblity callback, which will be called each time a ribbon is shown.
> You might want to post in microsoft.public.outlook.program_addins and/or
> microsoft.public.developer.outlook.addins.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Michael Tissington" <mtissington[ at ]newsgroup.nospam> wrote in message
> news:%23xuEw0bOHHA.4720[ at ]TK2MSFTNGP03.phx.gbl...
>>I have implemented IRibbonExtensibility but how can I only load the ribbon
>>when the Outlook form is from a specific folder or message class (we have
>>an ECE that does this for pre 2007)
>>
>> The RibbonID does not seem to reflect the actual message class.
>>
>
>


Re: IRibbonExtensibility and specific folders
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 1/17/2007 12:18:14 AM
I simply created a simply separate class for the COM add-in and communicates
with ECE using global variables. In case of OutlookSpy the ribbon hanling is
very simple - it is always shown no matter what :-)
I did ribbon related functionality for several other add-ins, but there the
show/hide ribbon logic was based on the sent/unsent state of the item.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Michael Tissington" <mtissington[ at ]newsgroup.nospam> wrote in message
news:OSphNRcOHHA.448[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Thanks, have you been able to connect your ece to the class containing the
> ribbon code ?
>
> "Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
> news:uE5qCJcOHHA.4172[ at ]TK2MSFTNGP03.phx.gbl...
>> If I remember correctly, you should be able to specify the ribbon
>> visiblity callback, which will be called each time a ribbon is shown.
>> You might want to post in microsoft.public.outlook.program_addins and/or
>> microsoft.public.developer.outlook.addins.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Michael Tissington" <mtissington[ at ]newsgroup.nospam> wrote in message
>> news:%23xuEw0bOHHA.4720[ at ]TK2MSFTNGP03.phx.gbl...
>>>I have implemented IRibbonExtensibility but how can I only load the
>>>ribbon when the Outlook form is from a specific folder or message class
>>>(we have an ECE that does this for pre 2007)
>>>
>>> The RibbonID does not seem to reflect the actual message class.
>>>
>>
>>
>
>


Re: IRibbonExtensibility and specific folders
"Patrick Schmid [MVP]" <pdschmid[ at ]nospam.mvps.org> 1/17/2007 12:54:56 AM
You can use the RibbonID though to narrow it already down. That means,
only send your RibbonX back to Outlook via GetCustomUI for those
RibbonIDs that could be used for your message class.
Then implement getVisible and getEnabled callbacks for your top-level
item (tab or group). When getVisible/getEnabled get called, you get an
IRibbonControl object that has a Context properties. You can use that
Context property to get a handle to the current Inspector and from there
figure out your message class. If it's the right message class, return
true, otherwise return false.
Why getVisible and getEnabled? Ribbon items that are not visible are
nonetheless included in the Options, Customize dialog. So a user could
potentially add any of those not available items to his or her QAT and
then call them when he or she shouldn't be able to call them. Therefore
you need to disable them as well.
You'll have to implement an Outlook event though to invalidate your
top-level control whenever you want to change the two attributes.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
Office 2007 Beta 2 Technical Refresh (B2TR):
http://pschmid.net/blog/2006/09/18/43
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

"Michael Tissington" <mtissington[ at ]newsgroup.nospam> wrote in message
news:#xuEw0bOHHA.4720[ at ]TK2MSFTNGP03.phx.gbl:

[Quoted Text]
> I have implemented IRibbonExtensibility but how can I only load the ribbon
> when the Outlook form is from a specific folder or message class (we have an
> ECE that does this for pre 2007)
>
> The RibbonID does not seem to reflect the actual message class.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net