View Single Post
  #1  
Old March 21st 09, 09:13 AM posted to microsoft.public.outlook.program_vba
masani paresh[_3_]
external usenet poster
 
Posts: 18
Default convert VBA code to Add-in

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

--
Thanks,
Paresh
Ads