Office add-in: wide image on excel ribbon - c#

I just want to know if it is possible to put a wide image (for example 100px wide) on excel ribbon. Now for me the only possibility to put an image on ribbon is to make the image a big-size button but it's still only 32x32 px. Any ideas?

No, it is not possible.
The Fluent UI is described in depth 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)

Related

How to use the RibbonTab interface in c#?

I am working in excel VSTO add-in.
In excel, having built-in tabs, groups, and controls in the ribbon.
I am trying to use the Microsoft.Office.Tools.Ribbon RibbonTab interface.
But I am not able to use this interface.
private RibbonTab hometab;
public bool ShowVisibleView(Office.IRibbonControl control)
{
hometab.Name = "View";
var groupList = hometab.Groups;
return true;
}
Here, hometab comes as null. So, I can't able to set the value for Name property in RibbonTab.
How can I achieve this?
The ribbon tab should be instantiated first. There are two main ways for creating a custom ribbon UI in Visual Studio:
Walkthrough: Create a custom tab by using Ribbon XML
Walkthrough: Create a custom tab by using the Ribbon Designer
You can't also manage built-in controls on the ribbon. The best what you could do is to repurpose built-in controls or build the ribbon from scratch.
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)
Read more about repurposing built-in controls in the Temporarily Repurpose Commands on the Office Fluent Ribbon article.

Add multiline items to ribbon menu c# dynamically

I want to add multiline item to ribbon menu (Microsoft.Office.Tools.Ribbon.RibbonMenu) in my office add-in like following image. but I don't know what these items should be?
*RibbonButton doesn't support multiline Label.
*RibbonLabel doesn't support variable font styles (like Bold and Normal).
UPDATE: if these features are not supported, is there another component (say DevComponents, Telerik, ...) that supports them?
Unfortunately not all ribbon features are available for developers. There is no way for add-in developers to implement something like that unfortunately.
You can read more about available ribbon controls and their attributes 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)

How to customize Excel Ribbon at runtime

Is there a way to use Netoffice to customize Office/Excel Ribbon at runtime, My concern is that I am trying to make plugin-able addin that adds button to Ribbon based on available action of my plugins.
I actually created my tab using XML but I can't figure out how to add items dynamically at runtime.
Thank you for help.
As far as I know netoffice doesn't provide anything for customizing the Fluent UI. The Ribbon UI is a static thing from its birth. The only possible dynamism is callbacks. For example, you can define a dynamicMenu which provides the getContent callback (gets an XML string that contains the contents of this dynamic menu).
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)
Also you may find these articles helpful:
Chapter 11: Creating Dynamic Ribbon Customizations (1 of 2)
Chapter 11: Creating Dynamic Ribbon Customizations (2 of 2)

Add button to Email in Outlook to process information

I wrote a Web App that collects key information regarding one customer from the ERP underlying database.
What I would like to achieve is that any email that is opened in Outlook gets a button with a hyperlink to that url and the email's sender address as the query string parameter.
How could this be done?
You can develop an Outlook add-in. See Walkthrough: Creating Your First VSTO Add-In for Outlook to get started quickly.
You can add custom controls on the ribbon and add context menu items for contacts allowing users to make a call. VSTO provides two main ways for customizing the UI:
Walkthrough: Creating a Custom Tab by Using the Ribbon Designer
Walkthrough: Creating a Custom Tab by Using Ribbon XML
You may find the Extending the User Interface in Outlook 2010 article helpful.
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)
If you need to support other platforms, not only the desktop edition of Outlook, you may consider developing a Mail App. See Overview of mail add-ins for Outlook. According to the latest news you will be able to add commands to the ribbon.

Get callback from custom tab in office backstage

I created a custom tab at the backstage view in Office 2010. Like this.
Now what i want to have is an event, that triggers when my tab is being pressed. Unfortunately the tab does not have an OnAction method or something like that.
Any ideas?
There is no such event for tabs. But you can specify getVisible callback for any control on that tab. Thus, the callback will be invoked at least when the tab is clicked for the first time.
You can read more about the Fluent UI (aka Ribbon 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)

Categories