![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi Guys
I'm trying to count the number of appointments in a calendar using the restrict method. If I add "items.IncludeRecurrences = True" then the numbers returned all equal 2147483647. Here is a code snippet: dateFrom = Date.Today dateTo = CDate("2014-01-01") strFind = "[Start] = " & DoubleQuote(Format(dateFrom, "dd MMM yyyy")) & " AND [Start] " & DoubleQuote(Format(dateTo, "dd MMM yyyy")) items = mapi.GetFolderFromID(sID).Items items.Sort("[Start]") items.IncludeRecurrences = True restrictedItems = items.Restrict(strFind) itemCounter = itemCounter + restrictedItems.Count can anyone see where the problem lies? Thanks |
#2
|
|||
|
|||
![]()
"baggers" wrote in message
... Hi Guys I'm trying to count the number of appointments in a calendar using the restrict method. If I add "items.IncludeRecurrences = True" then the numbers returned all equal 2147483647. Here is a code snippet: dateFrom = Date.Today dateTo = CDate("2014-01-01") strFind = "[Start] = " & DoubleQuote(Format(dateFrom, "dd MMM yyyy")) & " AND [Start] " & DoubleQuote(Format(dateTo, "dd MMM yyyy")) items = mapi.GetFolderFromID(sID).Items items.Sort("[Start]") items.IncludeRecurrences = True restrictedItems = items.Restrict(strFind) itemCounter = itemCounter + restrictedItems.Count can anyone see where the problem lies? The programming newgroup would be a better place to ask. microsoft.public.outlook.program_vba -- Brian Tillman [MVP-Outlook] |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Finding dates ahead without counting | Loracj | Outlook - Calandaring | 1 | March 26th 08 07:38 PM |
Counting reocurrances | Grandad | Outlook - General Queries | 1 | January 11th 08 01:48 PM |
Counting days | [email protected] | Outlook and VBA | 4 | November 21st 06 04:09 PM |
Counting Attachments in Messages | Chris Rhodes | Outlook and VBA | 5 | June 21st 06 05:57 PM |
outlook is miss counting contacts, why | Rosalind | Outlook - Calandaring | 0 | April 13th 06 08:12 PM |