How to create a Outlook 2013 Add-in Command? - vba

I want to create a Ribbon Button in the calendar view of Outlook that extracts some properties (e.g. data, time) of the current selected calendar item (appointment) in the Outlook calendar view and that creates a new Email with the properties listed in the text.
I also appreciate answers that will provide links to blogs, articles or videos related to this task, as I couldn't find much with the necessary guidance and explanation I need for this. Also other solutions to do this with Outlook on-board tools are welcome. Important: I do not just want to forward the appointment as an attachment to a new Email, I want the properties as text in the Email.
Remarks:
I have no background in MS Office plugin development, please consider this
I have successfully done this walktrough with the VBA code samples (https://msdn.microsoft.com/en-us/library/cc668191.aspx), that adds some text to every new Email message, but I couldn't figure out how to go on effectively to get my task done
Thanks

VBA doesn't allow creating a ribbon custom UI for Outlook. You need to develop a COM add-in for Outlook if you want to create a custom UI. Read more about that in the Walkthrough: Creating Your First VSTO Add-In for Outlook article.
VSTO provides two main ways for creating a custom ribbon UI:
Walkthrough: Creating a Custom Tab by Using Ribbon XML
Walkthrough: Creating a Custom Tab by Using the Ribbon Designer
You may find the Fluent UI 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)
Also, you may consider creating web-based add-ins (former known as Mail Aps), see Add-in commands for Outlook for more information.

Related

How to create toggle button for Macro

I have created a macro that will set the categories of out going mail without needing to open the tag dialog. I have added the macro to the ribbon via the "Customize Ribbon" options on outlook itself. That macro works fine, however I would like the button to be highlighted (toggled on) when the category is set and then regular (toggle off) when the category is no longer set.
I only have basic VB knowledge but have good knowledge of java so the concepts are familiar just not the syntax. This is also the first macro I've ever done.
I have tried searching Google and Stack for an answer but I think due to my lack of knowledge I'm not using the correct keyword to get a useful result.
Thanks for the help.
VBA macros don't allow creating a custom ribbon UI. You need to develop a COM add-in if you want to customize the Fluent UI by adding a toggle button to the Outlook window.
Take a look at the following articles to create a custom ribbon UI:
Walkthrough: Create a custom tab by using the Ribbon Designer
Walkthrough: Create a custom tab by using Ribbon XML
The Fluent 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)

Create a custom button with icon in a custom group for Outlook using C# VSTO

I am fairly new to C# as well as the Outlook Library.
I have created a custom group in Meeting Tab of Outlook, which has a button in it.
I also added an image in properties of Button(as displayed in the screenshot).
The image would represent the logo of my add-in. But I'm not able to change the size of that image.
I want my button to look similar to that of other buttons of Outlook just like 'Skype Meeting' or 'Meeting Notes' with the larger icon.
Can anyone please suggest me the way to design the Button with large icon.
I have created the Ribbon (Visual Designer) in Visual Studio 2015 for Outlook 2016 Add-In using VSTO. What would be the best way to do this using C#?
There are two sizes for "button" ribbon control:
size="large"
size="normal"
If you add into your button control XML large size, you'll get the button look you are referring to. For more information on how to customize Office Fluent Ribbon please refer to the following great resources:
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 got the solution for this problem.
We can set the property 'ControlSize' of Button to 'RibbonControlSizeLarge'.

PowerPoint 2010 - VBA - Use Ribbon Button Inside of a Userform

Is it possible to take a pre-existing button from the ribbon, Shape Fill from the Shape Styles category for example, and display it in a VBA userform?
My add-in manages a large number of shapes, and I would like to allow the user to style those shapes based on the category that they are in in the add-in.
I have read that a color dialog does not exist for us to use in VBA, so I'm trying to think of a way to work around that. Recreating all of the fill, outline, and effects menus seems like too much, there has to be a better way.
No, built-in ribbon controls can be used on the ribbon only. As a workaround you may consider using any ActiveX custom controls on your form.
Also you may consider creating a custom UI on the ribbon. In that case you will be able to add built-in ribbon controls to your own tab by specifying its idMso value. The full list of control IDs can be found in the following documents:
Office 2010 Help Files: Office Fluent User Interface Control Identifiers
Office 2013 Help Files: Office Fluent User Interface Control Identifiers
Office 2016 Help Files: Office Fluent User Interface Control Identifiers
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)

How to add a group to a (VBA) custom ribbon without xmlns/idQ?

Situation:
Users have an existing custom ribbon that is added via a .PPAM (combination of VBA macros and Ribbon customization XML).
We want to add a group to that custom ribbon via our managed COM add-in
For custom ribbons from other managed COM add-ins this is feasible via the xmlns:foo="bar" & idQ that can be extracted from the customUI Link
Complication:
Custom Ribbons from non-managed add-ins seem to have no xmlns namespace, they do not show up in the customUI
Even via PowerPoint/Office the user can not customize those ribbons.
Any idea how we could achieve adding buttons?
We can request changes to the non-managed/VBA add-in.
VBA add-ins don't have their own namespace by default, but can have one. If you create a custom namespace, then multiple VBA add-ins can share the same tab on the ribbon, for example.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"
xmlns:nsMySpace="SomeName">
Then to create a new tab that other add-ins can share:
<tab idQ="nsMySpace:MySpace_Tab" label="MyTabLabel">
In addition to Steve's answer we've discovered that VBA add-ins have a default namespace even when none is specified in their customUI.
You can extract the namespace by adding a control from the ribbon to the Quick Access and then exporting the UI Customizations. The resulting file should show:
<mso:cmd app="PowerPoint" dt="1" />
<mso:customUI xmlns:x1="C:\Users\USERNAME\AppData\Roaming\Microsoft\AddIns\Addin.ppam">
So the default namespace seems to be the complete Path to the add-in.
From a high perspective two add-ins can share a ribbon tab for controls because they are loaded into a single PowerPoint instance. When you develop a macro enabled file with a custom UI - only this file can be opened at the same time. But two add-ins can be run for the file/template. That's why idQ is intended to use by add-ins.
You can read more about the Fluent UI (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)

Backstage view in outlook 2007

I am developing an outlook 2007 add-in which is based on an existing outlook 2010 plugin. I managed to get most of the features working, because most of them were backwards compatible. However there are some I could not, because 2007 simply did not have certain features. \
Backstage view
Main ribbon
My question is - what would you suggest for an equivalent interface? Where would you put in outlook 2007 something that was in backstage view in 2010?
After much deliberation I decided to use a custom menu. All features available through the backstage view in 2010 will be converted to menu items in the custom menu in Outlook 2007.
Also buttons from the main ribbon will become items in the same custom menu.
This solution, while not as elegant as Fluent UI will work, I think, because all of my plugin's functionality will be available from one spot.