Results 1 to 2 of 2

Thread: Retrieving all recurring item instances

  1. #1
    Nikolay S Guest

    Retrieving all recurring item instances

    Hi,

    I have an application which synchronizes exchange information into the
    oracle database which we are using. I am able to sync everything, except for
    recurring appointments. As you know, we can create a recurring appointment
    in outlook, when that happens the multiple appointments are shown in outlook
    calendar, BUT only one record is created for the same on exchange server.

    When I make exceptions to the individual items like change subject or time
    of any of the individual items, it does not create separate records for the
    same on exchange, but simply the size of the main recurrence item changes.

    Till now, we have been unable to find out from which property on the main
    item, I can retrieve all the recurring items. Please help us, we need this
    urgently.

    I am using web dav protocol

    Regards,
    Vijay

  2. #2
    Blair Nygren Guest
    There is a recurring pattern class in the CDOEX or CDO object. Outlook
    manufactures the appointments on the fly from the Recurring patterns. It
    doesn't acutally create unique appointments. The pattern values are somewhat
    complex to understand.

    When you retrieve the appointment item on the exchange server
    AppointmentClass RecurrencePatterns you'll see all kinds of stuff.

    Here is a snippet of what I retrieved in C# into an XML document.. We store
    the recurring pattern in our database and then through the another interface
    recreate the appointments that recurr.

    if (iAppt.RecurrencePatterns.Count >= 1)
    {
    writer.WriteStartElement("recurringpatterns");
    foreach(interop.CDOEX.IRecurrencePattern rPat in
    iAppt.RecurrencePatterns)
    {
    writer.WriteStartElement("recurringpattern");

    interop.CDOEX.IIntegers bypos = rPat.ByPosition;
    // // Trace.WriteLineIf(false,DateTime.Now + " ByPosition # : " +
    bypos.Count,"OnSyncProcessorMethod");
    double byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    // // Trace.WriteLineIf(false,DateTime.Now + " ByPosition Value : " +
    bypos[j],"OnSyncProcessorMethod");
    }
    writer.WriteElementString("byposition",byposValue. ToString());


    bypos = rPat.DaysOfMonth;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    // // Trace.WriteLineIf(false,DateTime.Now + " DaysofMonth Value : "
    + bypos[j],"OnSyncProcessorMethod");
    }
    writer.WriteElementString("daysofmonth",byposValue .ToString());

    bypos = rPat.DaysOfWeek;
    byposValue= 0;
    // // Trace.WriteLineIf(false,DateTime.Now + " DaysOfWeek # : " +
    bypos.Count,"OnSyncProcessorMethod");
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += Math.Pow(2,bypos[j]);
    // // Trace.WriteLineIf(false,DateTime.Now + " DaysOfWeek Value : " +
    bypos[j],"OnSyncProcessorMethod");
    }
    writer.WriteElementString("daysofweek",byposValue. ToString());


    //----
    writer.WriteElementString("daysofweek",ConvertEnum erationToInteger(
    rPat.DaysOfWeek.ToString(),"recurrence_daysofweek" ).ToString());
    writer.WriteElementString("endtype",Enum.Format(ty peof(interop.CDOEX.CdoPatternEndType),rPat.EndType , "d"));
    writer.WriteElementString("firstdayofweek",Enum.Fo rmat(typeof(interop.CDOEX.CdoDayOfWeek),rPat.First DayOfWeek, "d"));
    writer.WriteElementString("frequency",Enum.Format( typeof(interop.CDOEX.CdoFrequency),rPat.Frequency, "d")); //rPat.Frequency.ToString());

    bypos = rPat.HoursOfDay;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    }
    writer.WriteElementString("hoursofday",byposValue. ToString());


    //writer.WriteElementString("hoursofday",Enum.Format (typeof(interop.CDOEX.IIntegers),rPat.HoursOfDay, "d")); //rPat.HoursOfDay.ToString());
    writer.WriteElementString("recur_interval",rPat.In terval.ToString());
    writer.WriteElementString("instances",rPat.Instanc es.ToString());

    bypos = rPat.MinutesOfHour;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    }
    writer.WriteElementString("minutesofhour",byposVal ue.ToString());


    //writer.WriteElementString("minutesofhour",rPat.Min utesOfHour.ToString());

    bypos = rPat.MonthsOfYear;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    }
    writer.WriteElementString("monthsofyear",byposValu e.ToString());

    //writer.WriteElementString("monthsofyear",rPat.Mont hsOfYear.ToString());

    bypos = rPat.MinutesOfHour;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    }
    writer.WriteElementString("minutesofhour",byposVal ue.ToString());


    //writer.WriteElementString("minutesofhour",rPat.Min utesOfHour.ToString());
    writer.WriteElementString("patternenddate",rPat.Pa tternEndDate.ToUniversalTime().ToString());
    bypos = rPat.SecondsOfMinute;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    }
    writer.WriteElementString("secondsofminute",byposV alue.ToString());


    //writer.WriteElementString("secondsofminute",rPat.S econdsOfMinute.ToString());
    writer.WriteElementString("recurtype",rPat.Type);

    //writer.WriteElementString("weekdays",rPat.WeekDays .ToString());

    // interop.CDOEX.IVariants ivar = rPat.WeekDays;
    // for(int j=1; j<ivar.Count+1; j++)
    // {
    // byposValue += bypos[j];
    // }
    interop.CDOEX.IVariants ivar = rPat.WeekDays;
    writer.WriteStartElement("weekdays")
    ;
    writer.WriteStartElement("array")
    ;
    for(int j=1; j<ivar.Count+1; j++)
    {
    System.Array iVal = (System.Array)ivar[j];

    int dimen = 0;
    for(int k=0;k<iVal.GetLength(dimen);k+=2)
    {
    writer.WriteElementString("byposition", iVal.GetValue(k).ToString());
    writer.WriteElementString("daysofweek",
    iVal.GetValue(k+1).ToString());
    // // Trace.WriteLineIf(false,DateTime.Now + " ByPosition : " +
    iVal.GetValue(k).ToString(),"OnSyncProcessorMethod ");
    // // Trace.WriteLineIf(false,DateTime.Now + " DaysofWeek : " +
    iVal.GetValue(k+1).ToString(),"OnSyncProcessorMeth od");
    }
    }
    writer.WriteEndElement(); // Array
    writer.WriteEndElement(); // Weekdays

    bypos = rPat.WeeksOfYear;
    byposValue= 0;
    for(int j=1; j<bypos.Count+1; j++)
    {
    byposValue += bypos[j];
    }
    writer.WriteElementString("weeksofyear",byposValue .ToString());

    //writer.WriteElementString("weeksofyear",rPat.Weeks OfYear.ToString());
    writer.WriteElementString("classtype","APT");
    writer.WriteEndElement();
    }
    writer.WriteEndElement();
    }
    --
    Blair Nygren
    Client Profiles Inc.


    "Nikolay S" wrote:

    Hi,

    I have an application which synchronizes exchange information into the
    oracle database which we are using. I am able to sync everything, except for
    recurring appointments. As you know, we can create a recurring appointment
    in outlook, when that happens the multiple appointments are shown in outlook
    calendar, BUT only one record is created for the same on exchange server.

    When I make exceptions to the individual items like change subject or time
    of any of the individual items, it does not create separate records for the
    same on exchange, but simply the size of the main recurrence item changes.

    Till now, we have been unable to find out from which property on the main
    item, I can retrieve all the recurring items. Please help us, we need this
    urgently.

    I am using web dav protocol

    Regards,
    Vijay


Similar Threads

  1. Replies: 0
    Last Post: 01-26-2009, 12:05 PM
  2. Item no longer exists. The item you are attempting to access
    By Bas van den DIkkenberg in forum Deploy
    Replies: 0
    Last Post: 07-19-2005, 03:05 PM
  3. Associating an Appointment Item with a Reminder Item
    By Jeff Galbraith in forum Development
    Replies: 0
    Last Post: 04-08-2005, 03:23 PM
  4. Replies: 0
    Last Post: 03-21-2005, 07:36 PM
  5. problem with web dav retrieving owa folder
    By hud in forum Development
    Replies: 0
    Last Post: 03-06-2005, 08:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - CAD Forum