Programmaticaly disable existing button in outlook compose window ribbon - outlook

Am writing an outlook add-in in c#. I would like to disable the "Permissions" button in the "Options" tab while composing a new email.
Am currently using Addin express for creating the outlook add-in

You need to use command tag with the getEnabled attribute defined. For example:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<commands>
<command idMso="Permissions" getEnabled="OnGetEnabled" />
</commands>
</customUI>
You can repurpose built-in ribbon controls, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
The list of built-in control IDs can be found in the following documents:
Office 2016 Help Files: Office Fluent User Interface Control Identifiers
Office 2013 Help Files: Office Fluent User Interface Control Identifiers

Related

Outlook addin Pin add-in on desktop

I've been create one add-in that gives support to clients when reading emails. The question is there a way to pin the add-in like the Insight add-in to keep helping the client as they open emails?
If you are creating an Outlook web add-in, this is possible by adding a pinnable task pane to your add-in manifest.
Please see the linked documentation for the full XML. If you already have a task pane, you can add the SupportsPinning element to it.
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="readTaskPaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
It's also important to implement a handler for the ItemChanged event so your add-in can show updated information when the user selects a different message.
While reviewing Microsoft Outlook documentation, I did not find any way to add a pin on Desktop
The only note I got from the documentation is:
In Outlook, click File > Manage Add-ins.
Click Manage Add-ins
In Outlook Web App, click Settings Settings > Manage add-ins.
Under Manage add-ins, in the Turned on column, select the check box for the add-in you want to enable.
Turn on or off add-ins
Microsoft Outlook documentation

Creating ribbons in Power Point for content pane add-ins

I am trying to create a content pane add-in for power point that includes ribbons with add-in commands. I have looked at the Create add-in commands tutorial as well as the examples here.
The add-ins in examples and tutorials that I'm able to find are all task pane add-ins. Is there a way to create content pane add-in with add-in commands and ribbons?
Following the tutorials, I have been able to create the commands for task pane add-ins. However, when I change the OfficeApp xsi:type from "TaskPaneApp" to "ContentApp", the add-in ribbon does not appear anymore. I believe this is because the schema I am using in VersionOverrides is not compatible with content apps.
Is there a VersionOverride schema for content pane add-ins? I have only been able to find http://schemas.microsoft.com/office/mailappversionoverrides and http://schemas.microsoft.com/office/taskpaneappversionoverrides.
Add-in Commands are currently only supported with Task Pane Add-ins.
From the documentation:
Content add-ins do not currently support add-in commands.

Button in ribbonbar for Outlook 2013

I try to develop a Outlook Add-Ins (pure js/html app), not an VSTO / COM app with c#.
I found a way to add a button to the ribbonbar, but it seems to be only for Outlook 2016: https://msdn.microsoft.com/en-us/library/office/mt267546.aspx
But, is there a way to add a button in the ribbonbar for Outlook 2013?
Can't find anything even on dev.outlook.com...
You need to develop a COM add-in then (VSTO). See Walkthrough: Creating Your First VSTO Add-In for Outlook for more information.
There are two main ways for creating a custom UI in VSTO add-ins:
Walkthrough: Creating a Custom Tab by Using Ribbon XML
Walkthrough: Creating a Custom Tab by Using the Ribbon Designer
Moreover, your ribbon commands can be displayed for Exchange profiles only (where Office Apps can be run). But COM add-ins are run for all kind of profiles in Outlook.

Adding a button to a 3rd party ribbon tab addin

I have a 3rd party addin in word 2010 and do not have access to the source code. The addin adds a new ribbon tab and many groups in the ribbon tab generated by the 3rd party addin.
I understand how to use vb2013 to create my own new ribbon tab etc. My question is, is it possible for me a create a new word 2010 addin, which somehow gets a handle on the 3rd party addin's ribbon tab and adds a button to one of the groups within the 3rd parties ribbon tab?
So basically, if the 3rd party addin is loaded in word, the user will get the 3rd party ribbon tab. If the 3rd party addin plus my possible new addin is added to word, the user should get the 3rd party ribbon, plus my new button generated by my personal addin, which somehow appears in the 3rd party ribbon tab.
Is this possible?
According to Microsoft this is only possible if you have access to the source code of both add-ins.
How do I create two add-ins that add items to the same group or tab?
The idQ property of controls exists to enable multiple add-ins to
share containers, such as custom tabs and groups. In the following VBA
example, two Excel add-ins share the same "Contoso" group on the
add-ins tab; each adds one button to it. The key is specifying the
same unique namespace in the <customUI> tag. Then, controls can
reference this namespace by using idQ.
CustomUI XML for add-in 1:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace" >
<ribbon>
<tabs>
<tab idMso="TabAddIns">
<group idQ="x:Contoso" label="Contoso">
<button id="C1" label="Contoso Button 1" size="large"
imageMso="FileSave" onAction="c_action1" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
CustomUI XML for add-in 2:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:x="myNameSpace" >
<ribbon>
<tabs>
<tab idMso="TabAddIns">
<group idQ="x:Contoso" label="Contoso">
<button id="C2" label="Contoso Button 2" size="large"
imageMso="FileSave" onAction="c_action2" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
If you use a COM add-in to customize the Fluent UI, the namespace name
must be the ProgID of the COM add-in, but the behavior is otherwise
the same. When you use a shared add-in, the ProgID is
AddInName.Connect. When you use Microsoft Visual Studio 2005 Tools for
the 2007 Microsoft Office System (Visual Studio 2005 Tools for Office
Second Edition) to create the add-in, the ProgID is the name of the
add-in.
So, unless the other add-in you are trying to piggyback has set up their ribbon using a namespace and the idQ-tag, it is unlikely that you'll be able to put your controls within it's ribbon groups/tabs.

Adding pre-defined Office Ribbon button to custom ribbon in Visual Ribbon Designer

I know how to add existing Office Ribbon items or groups to my custom ribbon using XML (using idMso tags) but how do I do this using the Visual Studio Ribbon (Visual Designer) technique?
Would really rather not have to build the entire thing using XML.
In Ribbon Designer, you can access the ControlId which points to the idMSO used in Ribbon UI XML. More specifically, ControlId.OfficeId represents the idMSO property that contains the specific Office control identifier.
tools.Ribbon.RibbonTab tab = Globals.Factory.GetRibbonFactory().CreateRibbonTab();
tab.ControlId.OfficeId = "TabNewMailMessage";

Resources