locked
Load first occurrence in Series (Appointment Items) RRS feed

  • Question

  • Hi all,

    Is it possible to load the first occurrence of the series after the save has occurred. In other words, after saving the series / master appointment, I want to get hold of the first appointment within the series and be able to show the inspector window (and close down the master window / inspector).

     

    Could anyone please assist me in this matter.

    Many thanks in advance.

    Kind regards, 


    Regards Programm3r
    Monday, January 24, 2011 1:51 PM

Answers

  • From the master get RecurrencePattern. In the RecurrencePattern get the PatternStartDate property, then use the GetOccurrence() method to return that first occurrence of the series. Once you have that item as an AppointmentItem call GetInspector() and show the Inspector. Call Close() on the master.
     
    Beyond the initial instance you have to parse the recurrence pattern and add that to the preceding data to get the date of the next instance. Then you call GetOccurrence() on that date. If that fails you need to review the Exceptions collection looking for instances that originally were on that date/time or for deleted instances.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Programm3r" <=?utf-8?B?UHJvZ3JhbW0zcg==?=> wrote in message news:36236ffc-6f0c-4c17-b081-f6c8c1548cf6...

    Hi all,

    Is it possible to load the first occurrence of the series after the save has occurred. In other words, after saving the series / master appointment, I want to get hold of the first appointment within the series and be able to show the inspector window (and close down the master window / inspector).

     

    Could anyone please assist me in this matter.

    Many thanks in advance.

    Kind regards, 


    Regards Programm3r

    Ken Slovak MVP - Outlook
    • Marked as answer by 许阳(无锡) Thursday, February 17, 2011 5:07 AM
    Monday, January 24, 2011 2:44 PM

All replies

  • From the master get RecurrencePattern. In the RecurrencePattern get the PatternStartDate property, then use the GetOccurrence() method to return that first occurrence of the series. Once you have that item as an AppointmentItem call GetInspector() and show the Inspector. Call Close() on the master.
     
    Beyond the initial instance you have to parse the recurrence pattern and add that to the preceding data to get the date of the next instance. Then you call GetOccurrence() on that date. If that fails you need to review the Exceptions collection looking for instances that originally were on that date/time or for deleted instances.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Programm3r" <=?utf-8?B?UHJvZ3JhbW0zcg==?=> wrote in message news:36236ffc-6f0c-4c17-b081-f6c8c1548cf6...

    Hi all,

    Is it possible to load the first occurrence of the series after the save has occurred. In other words, after saving the series / master appointment, I want to get hold of the first appointment within the series and be able to show the inspector window (and close down the master window / inspector).

     

    Could anyone please assist me in this matter.

    Many thanks in advance.

    Kind regards, 


    Regards Programm3r

    Ken Slovak MVP - Outlook
    • Marked as answer by 许阳(无锡) Thursday, February 17, 2011 5:07 AM
    Monday, January 24, 2011 2:44 PM
  • Hi Ken,

     

    Many thanks for the reply... I will try your suggestions and will keep you posted.

     

    Many thanks again.

    Kind regards,


    Regards Programm3r
    Monday, January 24, 2011 3:11 PM