I'm working with Outlook API dynamic menu control for my add-in. In my application I'm allowing users to add the paths from network drive and then add it dynamic menu control.
Every thing works as expected but the dynamic control always displays only 5 items at any point of time.
If there are more than 5 items in the control ,it displays only top 5.
Is there any size that we can set to display all the items .
I'm using Outlook 2010.
Thanks in advance.
What code do you use for adding new items to the menu?
Typically you need to define the getContent callback in the Ribbon XML markup. For a dynamic menu, retrieves XML content that describes the menu. Gets an XML string that contains the contents of this dynamic menu. The getContent method must return XML similar to the following to populate the menu. For example:
<menu xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<button id="dynaButton" label="Button"
onAction="OnAction" imageMso="FoxPro"/>
<toggleButton id="dynaToggleButton" label="Toggle Button"
onAction="OnToggleAction" image="logo.bmp"/>
<menuSeparator id="div2"/>
<dynamicMenu id="subMenu" label="Sub Menu" getContent="GetSubContent" />
</menu>
Read more about the Fluent UI in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
Also you may find the following articles helpful:
Chapter 11: Creating Dynamic Ribbon Customizations (1 of 2)
Chapter 11: Creating Dynamic Ribbon Customizations (2 of 2)
Related
I have created a dropdown menu with a ComboBox and a small macro.
This dropdown menu only works when I switch to presentation mode.
However, I want to use the dropdown in the edit mode, as a template. Is there a simple way to do this.
I have already found some posts about this topic, but no real solution yet.
You can customize the ribbon UI instead. In that case your custom UI will be available in the edit mode. See Customize the Office Fluent ribbon by using an Open XML formats file for more information.
The Fluent UI (aka Ribbon UI) is described in depth in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
You may also find the Custom UI Editor helpful.
Is there any way to add new buttons into the existing Move to folder dropdown (Gallery control with idMso="MoveToFolderGallery") in Outlook VSTO addin?
I was able to find Group containing it, and hide it with
<group idMso="GroupMoveActions" visible="false">
</group>
and add the same Move gallery to my group with changed name
<gallery idMso="MoveToFolderGallery" size="large"
label="zzz">
<button id="b1" label="My button"/>
</gallery>
But the button I have added does not appear (when I do the same with my own gallery, it appear).
Maybe there is a way to get RibbonGallery instance for the existing gallery and modify Items collection?
https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.tools.ribbon.ribbongallery.items?view=vsto-2017
You can't modify built-in controls. But you can add controls into your own custom UI (or just rebuild the whole ribbon from scratch) where you can add additional items.
Read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
I have group of buttons I have added to the mail main group. Is there a setting in the XML to allow these buttons to re-size themselves based on the size of Outlook like the built in Outlook buttons? I only see the option of large and normal button sizes, and if I remove the size tag it will show up as normal. Is there an option for this? Couldn't find the tag reference.
Auto-scaling enables ribbon groups to adapt their layout to best match the horizontal window size. The auto-scaling feature was added to Office 2010 and onwards. You can enable auto-scaling by setting the autoScale attribute of the <group> tag to True as follows:
autoScale="true"
Note, auto-scaling is set on a per-group basis. See Ribbon Extensibility in Office 2010: Tab Activation and Auto-Scaling for more information.
Read more about the Fluent UI in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
I'm using Visual Studio 2008. It is possible to add a Webbrowser item to a Form item, but is it possible to add a Webbrowser item to a Ribbon item ?
Or is there another way of showing a Web Page on the Ribbon ?
There is something called Ribbon-XML, may that do the job ?
Or is it possible to bind a Form (inheriting a Webbrowser) to the Ribbon ?
No, there is no way to place any third party controls on the ribbon except the ones defined by the Ribbon scheme.
Instead, you may consider placing a web browser control on a custom task pane. See Custom Task Panes for more information in MSDN.
Read more about the Fluent UI (aka Ribbon UI) in the following series of articles in MSND:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
I want to create a button like the 'Private' button when creating a new appointment/meeting. So that the button freeze in the mouse hover style when it gets clicked.
I create the button in the VBA project like this:
Set objCBC = objCB.Controls.Add(Type:= --WHICHTYPE--, _
Temporary:=True)
So does anybody know which type of button should be applied here??
Command bars were deprecated. You need to use the Fluent UI (aka Ribbon UI) instead. Unfortunately Outlook doesn't allows to customize the Fluent UI with VBA, you need to develop an add-in instead. You can read more about the new UI in the following series of articles in MSDN:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
See the toggleButton control in the list of available controls.