Incorrect Start Dates for Shared Recurring Appointments

ID: Q187933


The information in this article applies to:


SYMPTOMS

You programmatically retrieve recurring appointments from someone else's calendar using Microsoft Visual Basic for Applications or Visual Basic Scripting Edition (VBScript), and the start dates for all of the recurring appointments are the same.


CAUSE

The other person did not give you full access to their shared folder.


WORKAROUND

Use one of the following workarounds:

IMPORTANT: If you use the updated files from the patch above, you must use early binding in order for the Restrict method to work correctly. For more information on early vs. late binding, please see the following article in the Microsoft Knowledge Base:
Q181202 OL98: How to Automate Outlook from Another Program


STATUS

Microsoft has confirmed this to be a problem in Microsoft Outlook 98.


MORE INFORMATION

Microsoft 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 the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

http://www.microsoft.com/support/supportnet/refguide/
For more information about sharing or delegating folders, please see the following article in the Microsoft Knowledge Base:
Q182642 OL98: (CW) How to Open Someone Else's Calendar or Other Folder

Steps to Reproduce the Problem

IMPORTANT: This code will reproduce the symptoms in the SYMPTOMS section of this article. The code does NOT create a solution.
  1. Create a new recurring appointment in someone else's calendar. Do not use a second account on the Exchange server that you may have. The other calendar must be on a computer with completely different Microsoft Exchange or Microsoft Windows NT logons.


  2. Set the Subject of the appointment to "test recur" (without quotation marks).


  3. Right-click the Calendar folder and then click Properties. Click the Permissions tab, and give yourself Reviewer permissions.


  4. On your computer, run the following Visual Basic or Visual Basic for Applications automation code after setting a reference to the Outlook 98 Type Library:
    
          Sub TestRecur()
             Set ol = New Outlook.Application
             Set olns = ol.GetNamespace("MAPI")
             ' Change "emailname" to the other person's e-mail name.
             Set Recip = olns.CreateRecipient("emailname")
             Set Fldr = olns.GetSharedDefaultFolder(Recip, olFolderCalendar)
             Set CalItems = Fldr.Items
             CalItems.Sort "[Start]"
             CalItems.IncludeRecurrences = True
             Set ResItems = CalItems.Restrict("[Subject] = 'test recur'")
             For Each Appt In ResItems
                Debug.Print Appt.Start
             Next
          End Sub 


  5. Display the Immediate Window in the Visual Basic editor.


For more information about another problem related to working with shared folders and the Outlook 98 object model, please see the following article in the Microsoft Knowledge Base:
Q183897 OL98: Restrict Method Doesn't Work with GetSharedDefaultFolder


REFERENCES

For more information about creating solutions with Microsoft Outlook 98, please see the following articles in the Microsoft Knowledge Base:

Q180826 OL98: Resources for Custom Forms and Programming

Q182349 OL98: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol98


Keywords          : kbdta OffVBS 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: August 5, 1999