I'm have run into a wall
I have been given a task on extracting all appointment from a certain number of Shared Calendars in Outlook 2013. I'm able to read the calendar entries but have two major issues.
First issue is that I can't get "Restrict" to work, so every time it is given me all entries
i'm using this code here:
Dim oOutlook As Outlook.Application
Dim oNs As Outlook.namespace
Dim appt As Outlook.AppointmentItem
Dim objOwner As Outlook.recipient
Dim str_sql As String
Dim STR_OWNER As String
Dim item_Start_date As String
Dim item_Start_time As String
Dim app_Start As Date
Dim app_End As Date
Dim FolderCal As Object
Dim i As Long
Dim strRestriction As String
Dim myStart As Date
Dim myEnd As Date
Const olFolderCalendar = 9
myStart = C_DATE
myEnd = C_DATE
strRestriction = "[Start] >= '" & Format(Date, "yyyy/mm/dd") & "' AND [Start] <= '" & Format(Date + 14, "yyyy/mm/dd") & "'"
Set oOutlook = New Outlook.Application
Set oNs = oOutlook.GetNamespace("MAPI")
STR_OWNER = "Thomas"
Set objOwner = oNs.CreateRecipient(STR_OWNER)
If objOwner.Resolved Then
Set FolderCal = oNs.GetSharedDefaultFolder(objOwner, olFolderCalendar)
Set ItemsApt = FolderCal.Items
ItemsApt.IncludeRecurrences = True
Set oItemsInDateRange = ItemsApt.Restrict(strRestriction)
oItemsInDateRange.IncludeRecurrences = True
For Each appt In oItemsInDateRange
Next issue i'm having is "Recurrences"
The "Only" thing I want, is to take out all Recurrences on the dates they are actually planed in the calender and not only the master appointment start and end date
I have been searching the internet for two weeks now in order to get what I need, but have given up now, and that is why i'm seeking help here.
Many many thanks in advance!!!