C
CharlieH
Can anyone tell me why this code (VBA Excel2003) is NOT returning recurring
meetings? Thanks.
Sub Get_Meeting_Details()
Dim myOlApp As Outlook.Application
Dim myNamespace As Outlook.Namespace
Dim myMeetings As Outlook.Items
Dim myItems As Outlook.Items
Dim myItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myMeetings = myNamespace.GetDefaultFolder(olFolderCalendar).Items
mytimestart = Format(Range("A1"), "mm/dd/yyyy")
Range("A3").Select
strFilter = "[Start] > " & Quote(mytimestart & " 00:00") & " And [Start]
< " & Quote(mytimestart & " 23:59")
Set myItems = myMeetings.Restrict(strFilter)
myItems.Sort "[Start]"
For Each myItem In myItems
vblHours = vblHours + myItem.Duration
ActiveCell.Value = myItem.Start
ActiveCell.Offset(0, 3).Value = myItem.Subject
ActiveCell.Offset(0, 4).Value = myItem.Location
ActiveCell.Offset(0, 8).Value = myItem.Duration / 60
ActiveCell.Offset(1, 0).Select
Next
End Sub
meetings? Thanks.
Sub Get_Meeting_Details()
Dim myOlApp As Outlook.Application
Dim myNamespace As Outlook.Namespace
Dim myMeetings As Outlook.Items
Dim myItems As Outlook.Items
Dim myItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myMeetings = myNamespace.GetDefaultFolder(olFolderCalendar).Items
mytimestart = Format(Range("A1"), "mm/dd/yyyy")
Range("A3").Select
strFilter = "[Start] > " & Quote(mytimestart & " 00:00") & " And [Start]
< " & Quote(mytimestart & " 23:59")
Set myItems = myMeetings.Restrict(strFilter)
myItems.Sort "[Start]"
For Each myItem In myItems
vblHours = vblHours + myItem.Duration
ActiveCell.Value = myItem.Start
ActiveCell.Offset(0, 3).Value = myItem.Subject
ActiveCell.Offset(0, 4).Value = myItem.Location
ActiveCell.Offset(0, 8).Value = myItem.Duration / 60
ActiveCell.Offset(1, 0).Select
Next
End Sub