livy111
livy111

Reputation: 131

How to move existing Outlook VBA code into an Outlook add-in?

I am trying to develop add-ins because my organization wants to move away from macros, due to the logistical tasks of deploying to thousands of users.

Is there a guide to repurpose existing VBA code into add-ins?

I want to be able to view/modify the source code.

Most helpful article so far: https://blogs.msdn.microsoft.com/csharpfaq/2010/09/27/converting-a-vba-macro-to-c-4-0/ where they suggest "recording a macro in Office and then use the results in their code in VS".

Upvotes: 1

Views: 4309

Answers (1)

Eric Legault
Eric Legault

Reputation: 5834

I'm not aware of any VBA to VB.NET conversion tools, but the similarities are enough that you can copy and paste most code and correct the differences on the individual lines that prevent compilation. However it would be necessary to have a decent working knowledge of VB.NET in order to do this effectively.

I would though recommend that this task be considered a complete re-write, especially since you need to port it to an add-in project. The way you call your VBA methods may differ greatly depending on whether they are event or UI/Ribbon driven.

Also note that there is no macro recorder for Outlook.

Upvotes: 1

Related Questions