How to get AppointmentItem of Label "Business"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Newbie in Outlook objects trying to loop through all appointments in calendar
to extract appointment items with Label "Business". Please advise and any
sample code will be deeply appreciated. Thanks in advance!
 
Hi Michael, thanks for the reply. Is there some other way of achieving what I
have mentioned? Maybe via "Categories" instead. I just need to loop through
appointment items and extract appointment items of specific type i.e.
"Business", either indicated by "Label" or "Categories".

Thanks again!
 
Hi juzion,

yes, searching for categories would be another way. This loops through
your standard calendar and searches for "business" in the Appointment´s
categories:

Dim obj as Object
Dim oAppt as Outlook.AppointmentItem

For Each obj in
Application.Session.GetDefaultFolder(olFolderCalendar).Items
if TypeOf obj is Outlook.AppointmentItem Then
Set oAppt=obj
If Instr(oAppt.Categories, "business", vbTextCompare) Then
' match
Endif
Endif
Next
 
Back
Top