0

I have done a fair amount of VBA coding, primarily in MS Word. I have never done really any coding other than VBA. I am now trying to deploy a VBA macro to my colleagues to install on MS Outlook (365 desktop client). I would like to add a button to the home ribbon that calls the macro, nothing more. I do not want to overwrite the users' officeUI customizations. I understand this can't be done without an add-in.

I don't want to make a new web-based Office Add In because it is very unnecessary to create a server to host this single button. How can I do this?

I have tried creating a web-based Office Add In, but when I got to hosting I determined it was not going to work. I started the process of a VSTO add in but quickly became confused.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
tanko
  • 1
  • So as I understand it you have no need to deploy or use the web client, only thick client. Going by this page it looks like it is possible to install an add in from a file (not a URL) https://support.microsoft.com/en-us/office/get-an-office-add-in-for-outlook-1ee261f9-49bf-4ba6-b3e2-2ba7bcab64c8 – Nick.Mc May 19 '23 at 02:24
  • VSTO addin in VB.Net (so that you can convert your VBA code to VB.Net) sounds like a good option. JS addin won't be able to run any kind of VB code. – Dmitry Streblechenko May 19 '23 at 04:47

1 Answers1

0

VBA cannot be used for creating a custom UI in Outlook. The best what you could do is to assign your VBA macro to the QAT button. If you need to customize the ribbon UI in Outlook you need to develop an add-in - it can be a COM (VSTO) or web add-in. The latter has a very limited functionality in customizing the ribbon UI when comparing with VSTO.

VSTO add-ins can be more familiar because VB.NET can be used (VB.NET and VBA have a lot of common in syntax). COM add-ins have a rich API, but they work only on Windows desktop client applications. See Walkthrough: Create your first VSTO Add-in for Outlook.

Web add-ins requires some basic knowledge of web development technologies - at least JavaScript/TypeScript, HTML and related technologies. You can start a local web server for the development purposes and then deploy your add-in files on any web server like a static web app. With web add-ins you may support other platforms like MacOS, OWA, mobile apps. The ribbon UI customizations are limited, but you can add a button to the ribbon where you could display a task pane or just run your function. See Build your first Outlook add-in for more information.

Basically, that is entirely your choice according to the requirements set.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45