convert VBA code to Add-in

M

masani paresh

Hi,

I have written simple VBA macro to delete recurrence meetings in
outlook(macro cod is given below). Could any one please tell me what is the
simplest method to convert this macro into Outlook Add-in such that it should
create button on Outlook toolbar and also register itself and start working.

Sub DeleteMeetings()

Dim olkItems As Outlook.Items
Set olkItems = Session.GetDefaultFolder(olFolderCalendar).Items
olkItems.IncludeRecurrences = True

For Each olkAppt In olkItems
olkAppt.Delete
Next

Set olkItems = Nothing

MsgBox "Macro executed successfuly: " & Err

End Sub
 
K

Ken Slovak - [MVP - Outlook]

Using what development platform, language and Outlook version?

There is no VBA to addin converter, you first start with whatever platform
and language you want and set up a skeleton addin, then copy in your VBA
code and if necessary translate it into the language you're using.

If you intend to use managed code you will need to somehow shim your addin
so it has its own AppDomain, either using VATO or the COM shim wizard. If
using VB.NET you need to translate the code since VB.NET has many
differences from VBA code (for one thing Long is 64-bit and Integer is
32-bit). VB6 code is much closer to VBA code.

You then need to register your addin and deploy it as well as any
dependencies and prerequisites, such as the Framework for managed code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top