How to create toggle button for Macro - vba

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)

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.

In Outlook, composing a message, can I visually tag it somehow in VBA?

I have a some VBA that will file an outgoing message as a Task (and do some other things) if I tag it. One way I tag is by calling a macro that sets a UserProperty; I have assigned the macro to a button on the command bar.
I would like to visually mark the message as having been tagged before I send it, and then implement a toggle, but I'm struggling to find a way of doing it. So keeping the button depressed, or highlighted, would work but I can't see how to do this in the Fluent UI stuff. Alternatively, I'd like to add something to the area to the right of the "pop out" "discard" buttons at the top of the message.
I tried adding a category to the new message, but this is not displayed in the pane. I do have a UserProperty assigned, but I don't know how to display that either.
Any ideas?
Many thanks
VBA doesn't allow customizing the Fluent UI. You need to develop a COM add-in instead. To implement a toggle button on the Ribbon you need to define callbacks where you may check the user property value and update the UI accordingly. 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)

How to create a Outlook 2013 Add-in Command?

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.

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)

Outlook create a button like 'Private'

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.