Wednesday, June 2, 2010

MS Outlook COM : Retrieve Recurring Appointment Data

'Script to retrieve recurring item from appointment list
'VBA, would run the script editor along with outlook
'Changes to be done if need to run outside outlook in a vbscript
'Reference :


Public Sub Application_GetItem()
Set nms = Application.GetNamespace("MAPI")
Set fld = nms.GetDefaultFolder(9)
Set itms = fld.Items
lngCount = itms.Count
i = 0
For Each itm In itms
If itm.IsRecurring Then
i = i + 1
itm.Close (olDiscard)
End If
End Sub

No comments: