Ribbon Control questions

Status
Not open for further replies.
T

Tom

Hi All,

I have a few questions about the ribbion control.

1. How do I query for my ribbon control at run time? What interface am I

supposed to use?

2. Can I add/remove items dynamically at runtime from a ribbon control

combobox?

3. Are there and C++ (or VB) examples anywhere that fully demonstrate all

the controls?

Thanks,

Tom
 
K

Ken Slovak - [MVP - Outlook]

It's hard to be specific since you didn't mention what version of Outlook,

what version of VS, what version of VB, whether this is for unmanaged or

managed code and if managed whether a shared addin or a VSTO addin, or much

of anything else.

There's no one article that I've seen that covers everything and every

variation of handling things with the ribbon, but start with the article at

http://msdn.microsoft.com/en-us/library/aa338202.aspx. You can also go to

the Office Developer Web site at MSDN and download a lot of information,

references of ribbon id's, samples and so on.

"Tom" <tom@gigasoftdevelopment.com> wrote in message

news:u0YCA9utKHA.732@TK2MSFTNGP06.phx.gbl...
> Hi All,

> I have a few questions about the ribbion control.

> 1. How do I query for my ribbon control at run time? What interface am I
> supposed to use?
> 2. Can I add/remove items dynamically at runtime from a ribbon control
> combobox?
> 3. Are there and C++ (or VB) examples anywhere that fully demonstrate all
> the controls?

> Thanks,
> Tom
>
 
T

Tom

Sorry Ken - I am using unmananged code (ATL/C++) and all my add-ins support

Outlook 2000 and above - and any operating systems. Oh - and I am using VS

2008.

I am particularily interested in adding items and controls dynamically at

runtime.

Actually I saw that article you mentioned and it is fine if you want to

statically create controls.

I have searched the net and have not found any articles about adding

combobox items at run time. Can we do that? Can I query the interface from

the application object or inspector?

Thanks,

Tom
<kenslovak@mvps.org> wrote in message

news:evIwhCvtKHA.5008@TK2MSFTNGP05.phx.gbl...
> It's hard to be specific since you didn't mention what version of Outlook,
> what version of VS, what version of VB, whether this is for unmanaged or
> managed code and if managed whether a shared addin or a VSTO addin, or
> much of anything else.

> There's no one article that I've seen that covers everything and every
> variation of handling things with the ribbon, but start with the article
> at http://msdn.microsoft.com/en-us/library/aa338202.aspx. You can also go
> to the Office Developer Web site at MSDN and download a lot of
> information, references of ribbon id's, samples and so on.

> >

>

> "Tom" <tom@gigasoftdevelopment.com> wrote in message
> news:u0YCA9utKHA.732@TK2MSFTNGP06.phx.gbl...
> > Hi All,
>

>> I have a few questions about the ribbion control.
>

>> 1. How do I query for my ribbon control at run time? What interface am I
> > supposed to use?
> > 2. Can I add/remove items dynamically at runtime from a ribbon control
> > combobox?
> > 3. Are there and C++ (or VB) examples anywhere that fully demonstrate all
> > the controls?
>

>> Thanks,
> > Tom
> >

>
 
K

Ken Slovak - [MVP - Outlook]

There's limited support for doing much dynamically with most of the ribbon

controls. There are also limited resources for documentation on working in

unmanaged C++, most of the code samples are in C# or VB.NET, only a few in

VB6. I believe there is some C++ at www.outlookcode.com.

I mostly use a dynamicMenu control when I want something to be truly

dynamic. As far as adding members to the combobox ore dropdown list, that

can be done to a degree. You can't really query the interface, but you can

force callbacks by invalidating that control or all of your controls using

InvalidateControl("myControl") or InvalidateControls().

I've used dropdown controls with their onAction, getItemCount, getItemID,

getItemLabel and getSelectedItemIndex callbacks to control the list at

runtime. For example creating a dropdown control and displaying a list of

email accounts. Similar things can be done with combos.

For handling Outlook 2000 and above things are different in C++, but for C#

I use a modified set of COMImport statements derived from an article on

Andrew Whitechapel's blog. Andrew used to be on the VSTO team. That article

is at

http://blogs.msdn.com/andreww/archi...or-multiple-office-versions-without-pias.aspx

and there's also a followup article. For VB6 code I use a tlb derived from

the Office 2007 library that exposes the ribbon interfaces

(XLIRibbonExtensibility.tlb) from XL-Dennis's Web site.

"Tom" <tom@gigasoftdevelopment.com> wrote in message

news:OwJruJvtKHA.4908@TK2MSFTNGP06.phx.gbl...
> Sorry Ken - I am using unmananged code (ATL/C++) and all my add-ins
> support Outlook 2000 and above - and any operating systems. Oh - and I am
> using VS 2008.

> I am particularily interested in adding items and controls dynamically at
> runtime.

> Actually I saw that article you mentioned and it is fine if you want to
> statically create controls.

> I have searched the net and have not found any articles about adding
> combobox items at run time. Can we do that? Can I query the interface from
> the application object or inspector?

> Thanks,
> Tom
 
T

Tom

That is what I thought ken.

But I never thought about invalidating to force a callback - good idea!

I have so many customers who don't like to use the add-in tab for Outlook

2007 because it hides their obvious logic. So they want something visible

that says their company name.

FYI- Also I have numerous requests to add a simple button next to the send

button on the new message window. Are we ever going to be able to do this?

We have actually had clients change their mind about doing anything with

Outlook because of that one lacking feature. For example some companies like

button functionality like -"Send and save on network". And they want it

next to the send button. I think this is one feature that needs to be added

to Outlook.

Thanks again for your input.
<kenslovak@mvps.org> wrote in message

news:e28EGxvtKHA.4332@TK2MSFTNGP05.phx.gbl...
> There's limited support for doing much dynamically with most of the ribbon
> controls. There are also limited resources for documentation on working in
> unmanaged C++, most of the code samples are in C# or VB.NET, only a few in
> VB6. I believe there is some C++ at www.outlookcode.com.

> I mostly use a dynamicMenu control when I want something to be truly
> dynamic. As far as adding members to the combobox ore dropdown list, that
> can be done to a degree. You can't really query the interface, but you can
> force callbacks by invalidating that control or all of your controls using
> InvalidateControl("myControl") or InvalidateControls().

> I've used dropdown controls with their onAction, getItemCount, getItemID,
> getItemLabel and getSelectedItemIndex callbacks to control the list at
> runtime. For example creating a dropdown control and displaying a list of
> email accounts. Similar things can be done with combos.

> For handling Outlook 2000 and above things are different in C++, but for
> C# I use a modified set of COMImport statements derived from an article on
> Andrew Whitechapel's blog. Andrew used to be on the VSTO team. That
> article is at
> http://blogs.msdn.com/andreww/archi...or-multiple-office-versions-without-pias.aspx
> and there's also a followup article. For VB6 code I use a tlb derived from
> the Office 2007 library that exposes the ribbon interfaces
> (XLIRibbonExtensibility.tlb) from XL-Dennis's Web site.

> >

>

> "Tom" <tom@gigasoftdevelopment.com> wrote in message
> news:OwJruJvtKHA.4908@TK2MSFTNGP06.phx.gbl...
> > Sorry Ken - I am using unmananged code (ATL/C++) and all my add-ins
> > support Outlook 2000 and above - and any operating systems. Oh - and I am
> > using VS 2008.
>

>> I am particularily interested in adding items and controls dynamically at
> > runtime.
>

>> Actually I saw that article you mentioned and it is fine if you want to
> > statically create controls.
>

>> I have searched the net and have not found any articles about adding
> > combobox items at run time. Can we do that? Can I query the interface
> > from the application object or inspector?
>

>> Thanks,
> > Tom

>
 
K

Ken Slovak - [MVP - Outlook]

The Add-Ins tab entries have no discoverability.

It's worse in Outlook 2010 because you also have that for Explorers. In

addition, what you used to add to property pages now is also not

discoverable unless you re-write to use Backstage instead.

To support various versions I now have Inspector ribbons and commandbars,

Explorer ribbons and commandbars, property pages and Backstage all supported

in one addin dll. Lots of version testing and special case code.

You cannot add anything to the big Send button area, nor can you repurpose

that button as you can with most other ribbon controls. My customers have

had to accept either a new ribbon group or tab for that. My information is

that there is no thought to allowing us to customize that button or that

area.

I hate to suggest it, but if there's no compromise you might have to use

start from scratch and design your own ribbon for customers like that from

scratch where you can design what they want. Of course the development costs

may make them decide they'd love the button somewhere else :)

With invalidating you have to check and see which callbacks are forced by

invalidating. Some are not called again, some are, depending on the control

and the callback. So you have to test for suitability for your purposes.

"Tom" <tom@gigasoftdevelopment.com> wrote in message

news:OZwly4vtKHA.5036@TK2MSFTNGP02.phx.gbl...
> That is what I thought ken.
> But I never thought about invalidating to force a callback - good idea!

> I have so many customers who don't like to use the add-in tab for Outlook
> 2007 because it hides their obvious logic. So they want something visible
> that says their company name.

> FYI- Also I have numerous requests to add a simple button next to the send
> button on the new message window. Are we ever going to be able to do this?
> We have actually had clients change their mind about doing anything with
> Outlook because of that one lacking feature. For example some companies
> like button functionality like -"Send and save on network". And they want
> it next to the send button. I think this is one feature that needs to be
> added to Outlook.

> Thanks again for your input.
 
T

Tom

Yep - I have already run into the testing debacle. It is really becoming a

pain. We really started to add testing all of our custom addins proposals.

It takes a long time to test each version.

I sometimes wish we could install multiple versions of Outlook on one

desktop (same with IE).
<kenslovak@mvps.org> wrote in message

news:OIAktIxtKHA.3408@TK2MSFTNGP06.phx.gbl...
> The Add-Ins tab entries have no discoverability.

> It's worse in Outlook 2010 because you also have that for Explorers. In
> addition, what you used to add to property pages now is also not
> discoverable unless you re-write to use Backstage instead.

> To support various versions I now have Inspector ribbons and commandbars,
> Explorer ribbons and commandbars, property pages and Backstage all
> supported in one addin dll. Lots of version testing and special case code.

> You cannot add anything to the big Send button area, nor can you repurpose
> that button as you can with most other ribbon controls. My customers have
> had to accept either a new ribbon group or tab for that. My information is
> that there is no thought to allowing us to customize that button or that
> area.

> I hate to suggest it, but if there's no compromise you might have to use
> start from scratch and design your own ribbon for customers like that from
> scratch where you can design what they want. Of course the development
> costs may make them decide they'd love the button somewhere else :)

> With invalidating you have to check and see which callbacks are forced by
> invalidating. Some are not called again, some are, depending on the
> control and the callback. So you have to test for suitability for your
> purposes.

> >

>

> "Tom" <tom@gigasoftdevelopment.com> wrote in message
> news:OZwly4vtKHA.5036@TK2MSFTNGP02.phx.gbl...
> > That is what I thought ken.
> > But I never thought about invalidating to force a callback - good idea!
>

>> I have so many customers who don't like to use the add-in tab for Outlook
> > 2007 because it hides their obvious logic. So they want something visible
> > that says their company name.
>

>> FYI- Also I have numerous requests to add a simple button next to the
> > send button on the new message window. Are we ever going to be able to do
> > this? We have actually had clients change their mind about doing anything
> > with Outlook because of that one lacking feature. For example some
> > companies like button functionality like -"Send and save on network".
> > And they want it next to the send button. I think this is one feature
> > that needs to be added to Outlook.
>

>> Thanks again for your input.

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
witzker Customized Ribbon lost every now and then Using Outlook 3
M Disable Contact Card Results when using "Search People" in Outlook Ribbon Using Outlook 7
witzker Customized ribbon and entries disappeared Using Outlook 0
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
W Ribbon XML customization Using Outlook 4
M Simplified ribbon missing Using Outlook 3
L Outlook Office 365 client: won't remember my setting File, not to collapse ribbon Using Outlook 2
S How to set up button in ribbon for individual Quick Steps Using Outlook 1
A Possible to hide ribbon with custom appointment form? Outlook VBA and Custom Forms 3
I Retention policies on outlook 2016 ribbon Using Outlook 2
V not able to change name in customize Ribbon Outlook VBA and Custom Forms 1
Wayne Dardis Calling Ribbon Button in Outlook 2016 Outlook VBA and Custom Forms 6
W Adding A Macro To Message Ribbon Outlook VBA and Custom Forms 2
Diane Poremsky Customize the Outlook Toolbar, Ribbon or QAT Using Outlook 0
M No Show Group on ribbon Using Outlook 8
I Ribbon buttons grayed-out in Outlook 2013 Using Outlook 2
B How can I adjust the ribbon width? I want to see all of my Quick Steps. Using Outlook 1
piusg 2013: Place custom view on the ribbon Using Outlook 3
P Outlook 2007 Calendar Ribbon has changed and I can't fix it Using Outlook 10
R Can I create custom subgroups on the ribbon? Using Outlook 5
M missing iCloud tab on ribbon bar Using Outlook 0
G Adding 3rd-Party Add-In to Home Ribbon in Outlook 2010 Using Outlook 1
E Outlook Ribbon Customization and Deployment Using Outlook 1
C Outlook Calendar Ribbon with iCloud Using Outlook 2
S ADD-IN Ribbon Missing Using Outlook 2
S ADD-IN Ribbon Missing Using Outlook 5
S Outlook 2010 Ribbon - Creating Links To Websites or EXE Files Using Outlook 4
M Move 'Reply All' on Ribbon in Outlook 2010 Using Outlook 2
L Email button on ribbon defaulting to exchange when POP is default Using Outlook 7
K call a help file when click on a button xml ribbon Outlook VBA and Custom Forms 1
J Executing Ribbon Command from Code Outlook 2010 Outlook VBA and Custom Forms 3
T Word 2007 add-in ribbon icons greyed out Outlook VBA and Custom Forms 1
K add a designed group into a existing inspector ribbon Outlook VBA and Custom Forms 7
C Create a Ribbon for the OL2010 Explorer Outlook VBA and Custom Forms 1
S What's the appointment ribbon called? Outlook VBA and Custom Forms 1
H Program "Click on Ribbon Button" Using VBA Outlook VBA and Custom Forms 1
M Can I embed ribbon item into form region? Outlook VBA and Custom Forms 2
R Build custom ribbon in Outlook 2007 Outlook VBA and Custom Forms 3
C Ribbon problem Outlook VBA and Custom Forms 3
J Ribbon question Outlook VBA and Custom Forms 6
R Could i do this with ribbon(outlook2007)? Outlook VBA and Custom Forms 1
M Stop ribbon item tool tip text from wrapping? Outlook VBA and Custom Forms 2
T Ribbon and a checkbox (C++ ATL) Outlook VBA and Custom Forms 8
H access appointmentItem from ribbon menu Outlook VBA and Custom Forms 1
D Application.ActiveInspector() is Null on Ribbon Load Outlook VBA and Custom Forms 1
T Using Ribbon in Inspector window Outlook VBA and Custom Forms 2
C Form Region, Task Pain, Ribbon Extension - which way is best? Outlook VBA and Custom Forms 1
glnz O365 - How to control whether my From name shows as "Dicky". Using Outlook 2
J Outlook Office 365 Win 10 how do I control background colors of events? Using Outlook 1
D font control by keyboard Using Outlook 2

Similar threads

Top