Article ID: 170789 - Last Review: February 12, 2007 - Revision: 1.3 OL97: How to Retrieve All Recurring Appointments with CodeThis article was previously published under Q170789 SUMMARY
When writing programming code that retrieves a set of calendar appointments
in Microsoft Outlook 97, you cannot retrieve all of the recurring
appointments unless you set the IncludeRecurrences property to True for the
collection of items.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites: Microsoft Certified Partners - https://partner.microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104) Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice (http://support.microsoft.com/gp/advisoryservice) For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms) In Outlook, you can create a recurring appointment, such as a meeting that occurs every Monday. Using Visual Basic Scripting Edition (VBScript) or Visual Basic for Applications automation code, you can use various methods to retrieve all or a subset of appointments from the Outlook Calendar. The Find and Restrict methods are typically used to retrieve a subset of all the appointments, such as the appointments for a particular month. For example, assume a recurring appointment was originally created on the first Monday in January and that the appointment was set to recur on every Monday thereafter. If you use the Restrict method to retrieve all of the appointments in January, by default only the appointment for the first Monday is returned. If you use the Restrict method to retrieve the appointments in February, none of the recurring appointments are retrieved. When programmatically referring to a group of appointments, these items are part of the Items Collection Object, which is a topic in the Vbaoutl.hlp file. In addition to the example in that topic, which returns all items in a folder, you can use the Find or Restrict methods to create a smaller collection (or subset) of appointments. Once you specify the proper collection, use the IncludeRecurrences property to add all of the recurring appointments to the collection. The following code example (with additional comments) is from the Vbaoutl.hlp file. It assumes you have already set up one recurring appointment in your calendar and that you have the Calendar folder selected: REFERENCES
For more information, see the "IncludeRecurrences Property" topic in the
Vbaoutl.hlp file.
For more information about installing Vbaoutl.hlp, please see the following article in the Microsoft Knowledge Base: 166738
(http://support.microsoft.com/kb/166738/EN-US/
)
OL97: How to Install Visual Basic Help
For more information about creating solutions with Microsoft Outlook 97,
please see the following articles in the Microsoft Knowledge Base:
166368
(http://support.microsoft.com/kb/166368/EN-US/
)
OL97: How to Get Help Programming with Outlook
170783
(http://support.microsoft.com/kb/170783/EN-US/
)
OL97: Q&A: Questions about Customizing or Programming Outlook
| Article Translations
|

Back to the top
