Create Add-In for Outlook 2013 for add a Button - c#

Good morning,
my company is looking for a solution in order to distribute an add-in for Outlook 2013 that add a button in the ribbon. I want to create an add-in for Outlook 2013 and I saw that is possible using Visual Studio (I use VS 2013 or 2010) but I don't understand how to add a button in the ribbon (in particular in Home section) and execute a macro when I click on the button (the macro is already created). I read this tutorial https://msdn.microsoft.com/en-us/library/cc668191.aspx and this worked. Someone can help me with some piece of code(c#)?
Thanks for your help

VSTO provides two main ways for customizing the Ribbon UI:
Using the Ribbon designer. See Walkthrough: Creating a Custom Tab by Using the Ribbon Designer for more information.
Using the Ribbon XML markup. See Walkthrough: Creating a Custom Tab by Using Ribbon XML for more information.
You need to specify the idMso attribute of the built-in tab if you need to add your custom controls there. See Office 2013 Help Files: Office Fluent User Interface Control Identifiers for control IDs.
Finally, I'd suggest moving your VBA macro to the add-in. It will improve the overall performance and allows to use the BCL classes (a wide varioety of controls and components) for getting the job done. Moveover, you will be able to deplay the add-in easily. VBA macros are not designed for deployiong on multiple PCs.

Related

Outlook VSTO Add-In loads, but ribbon doesn't

I'm making an Outlook VSTO Add-In with a ribbon and the ribbon stopped loading. I'm using the Ribbon (Visual Designer). It was loading fine, I made some code changes, fired up a new session, and it wouldn't load. There is no "Add-Ins" item in the ribbon.
I think the problem is in my Outlook, not in my project.
I created a new project to make sure there wasn't something wrong with my larger project, using the most basic code with no code in the addin class and only a single group in the ribbon. It still won't load.
ThisAddIn_Startup is firing, so I know the addin is loading in Outlook
I've tried both Ribbon Designer and XML
RibbonType is set to Microsoft.Outlook.Explorer
I've deleted all .vsto files and removed references in the registry
I've rebooted
First of all, I'd suggest making sure you don't have any ribbon UI errors at runtime. Here is what MS states:
By default, if a VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear.
See How to: Show Add-in user interface errors for more information.
Make sure that you did all the steps described in the following articles (one of them):
Walkthrough: Create a custom tab by using the Ribbon Designer
Walkthrough: Create a custom tab by using Ribbon XML
If you use the ribbon XML approach you can set up a breakpoint in the ribbon's getCustomUI callback to make sure the callback is invoked and what ribbon XML is returned.

Outlook add-in dev - VSTO vs Web, and is changing the form is possible?

It's my first time developing add in for outlook.
I saw that there is a way to develop add in in web technologies such as Angular, React, etc. This add in will work both on older version and new version of outlook?
If I want to develop also for Outlook 2007 | 2013, will add in developed in react will still work?
Another question I had, my add-in should change the current views
I want to add small marks on appointment on the calendar view (see the coloured dots on the meetings)
Add some insights in appointment invitations
Add custom field to new appointment form
I tried to look for solutions that change the views but found only solution that add custom forms and not changing the current form.
Is it possible?
Thanks!
Outlook add-ins are supported in Outlook 2013 or later for Windows, Outlook 2016 or later for Mac. More on Supported hosts.
You will be limited to the certain Extension points. Extension points are the ways that add-ins integrate with Outlook. There is no way to customize Outlook interface with the add-in, instead you will be given the aria (pane, dialog) where you going to display your own UI and communicate with a form to enhance user experience.
If you need to support older Outlook clients and custom forms, you should stay with VSTO technology. Read more on ... How are Office Add-ins different from COM and VSTO add-ins?

Searchable Combobox in Office Ribbon Control (Addin Express)

I'm developing an outlook addin using Addin Express Library. I'm currently using the adxribboncontrol.I need to implement ability to search the control based on user input.For a normal winforms control this can be easily implemented as suggested in this SO question Selecting an item in comboBox by typing
But i dont know how to implment this is office ribbon control.The control does not have the relavent properties.How can i get over this issue.
The Fluent UI (aka Ribbon UI), nor Add-in Express, doesn't provide anything for that. It is not possible on the ribbon. It has a limited number of controls.
Instead, I'd suggest creating a view/form region in Outlook where you can place any .net controls with the required functionality. See Advanced Outlook view and form regions for more information.

Outlook 2010 addin bind event to tab selection

I need to develop an Outlook 2010 add-in and I am new to Visual Studio and C#. I am using Visual Studio 2010 and I've created a project using built-in Outlook 2010 add-in template. I've created a new ribbon and I would like to trigger an event handler when a user selects the ribbon tab. Is that possible? If yes, then what objects and what events should I use? I'd like to have some guidelines on what to do, like a sequence of instructions, 'cause I don't know where to start, really.
Well first of i can help you there but step by step i can suggest a few links that have tutorials on doing this.
But to answer if you can trigger an event if you select the ribbon tab, yes this can be done in C# its usually .focus event.
First of lets say the code might be like this your ribbon name lets say is
Ribbon ribbon1=new ribbon();
if(ribbon.focus()==true)
{
messagebox.show();
}
well i hope u get the idea these are the links that you 'might' :-) have missed
http://msdn.microsoft.com/en-us/library/bb226712%28v=office.12%29.aspx
http://msdn.microsoft.com/en-us/magazine/cc163403.aspx

C# Outlook Addin w/ WPF

I have looked at several tutorials on writing general Outlook add-ins, and have gotten simple examples to work: items in menu, context menu, ribbons, etc.
Many of Microsoft's documentation has send me in circles, or is in VB, so I have run into some questions with what we are trying to accomplish.
Is there a way to add a custom control below the Subject line in a new email? We need to supply a drop-down and add an additional header to emails sent for email tracking. Right now the best I have gotten is adding a CommandBarButton in the "Add-ins" tab of the Ribbon, is there a better method?
Will we run into any issues installing for multiple versions of outlook? (Will only 2007 and higher work?)
Can you host WPF controls directly in a Ribbon, etc.? I know that WPF popup windows work just fine when shown from a CommandBarButton.
Are there some good links out there for what we're trying to do?
2: Multi-version support is a PITA. The hedge-your-bets approach is to develop on a PC running the version of Outlook you want to support; thus you may have multiple setup packages for each supported version. Everybody tries to get around this though, but I've used this approach with success:
Version-Specific UI in Add-ins - Andrew Whitechapel - Site Home - MSDN Blogs:
http://blogs.msdn.com/b/andreww/archive/2008/09/02/version-specific-ui-in-add-ins.aspx
4: Essential resources:
Visual Studio Tools for Office For Office and Outlook for Developers Forums on MSDN
OutlookCode.com
(FYI, I work for Add-in Express)
No, not without implementing the entire message window.
We have to make 2 projects for 2007 and 2010, we are skipping 2003 and below b/c it is much more difficult and would be rarely used.
Can't host WPF in a Ribbon, we're going to display a WPF popup from a Ribbon button press.
Best thing I've found is to just follow the project template in Visual Studio and mess around.
Overall, our add-in is going to do the following:
Make 2 projects for 2010 and 2007 that share a "Shared" assembly
All reusable work is done in the shared assembly
WPF is only displayed via popup windows (you can do a custom task pane, but it doesn't make sense for our add-in)

Categories

Resources