Outlook create a button like 'Private' - vba

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.

Related

How to run an Macro in PowerPoint in the edit mode without starting the presentation

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.

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'.

Outlook custom buttons in ribbon

I can use custum ui editor for Excel and Word VBA projects to add custom buttons on the ribbon with XML.
I have an Outlook-project (VBAProject.otm) and would like to do the same thing, to add buttons to the ribbon so when I'm deploying the custom buttons move with it.
I don't wont to use VSTO, only VBA.
Any suggestions?
Unlike other Office applications, in Outlook VBA macros can't be used for customizing the ribbon UI. You need to develop a COM add-in (for example, a VSTO based one). Take a look at the following articles:
Walkthrough: Creating a Custom Tab by Using the Ribbon Designer
Walkthrough: Creating a Custom Tab by Using Ribbon XML
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)
Full Credit to This Site

Webbrowser on Excel Ribbon?

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)