Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / September 2005

Tip: Looking for answers? Try searching our database.

Problem with RecurrencePattern::GetOccurrence

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chuck Bohling - 04 Sep 2005 01:07 GMT
I'm trying to create exceptions to a recurring appointment. I create a daily
recurring appointment and save it. Then reopen it, do a
GetRecurrencePattern, then a GetOccurrence, change the Subject, save the
exception and save the parent/owner appointment. If the number of exceptions
is small, 140 with outlook 2003, everything is fine. But if the number is
about 150, outlook does not show the appointment or any of the exceptions.
With outlookspy I can see the attachment table and all the exceptions are
there. I can OpenProperty on them. Outlook simply doesn't display them. Any
idea what is wrong and how to fix the problem?
Ken Slovak - [MVP - Outlook] - 06 Sep 2005 15:23 GMT
Show the code you're using.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> I'm trying to create exceptions to a recurring appointment. I create a
> daily
[quoted text clipped - 8 lines]
> Any
> idea what is wrong and how to fix the problem?
Chuck Bohling - 07 Sep 2005 02:18 GMT
Thanks. Here's the code . If the number of exceptions is less than 140, all
appointment items show in outlook's "day/week/month" view. But if the number
is something like 150, nothing shows in the view. However, the exceptions
are in the message's attachment table and look valid.

_AppointmentItemPtr appt = m_pApp->CreateItem(olAppointmentItem);
 appt->Subject = "test";

 COleDateTime today(2005, 9, 6, 0, 0, 0);
 appt->Start = today + COleDateTimeSpan(0, 16, 0, 0);
 appt->End = appt->Start + COleDateTimeSpan(0, 1, 0, 0);

 RecurrencePatternPtr recurPat = appt->GetRecurrencePattern();
 recurPat->RecurrenceType = olRecursDaily;
 recurPat->PatternStartDate = today;

 appt->Save();

 appt =
m_pApp->GetNamespace(L"MAPI")->GetDefaultFolder(olFolderCalendar)->Items->Item(1);
 recurPat = appt->GetRecurrencePattern();

 // if i < 140, appointments show in outlook's "day/week/month" view
 // if i > 140 or so, appointments do not show in outlook's
"day/week/month" view
 // in all cases, appointments show in MAPI attachment table and in
outlook's "by category" view

 for (int i = 0; i < 150; i++)
 {
    _AppointmentItemPtr exception = recurPat->GetOccurrence(appt->Start +
COleDateTimeSpan(i, 0, 0, 0));
    CString cs;
    cs.Format("%d", i);
    exception->Subject = (bstr_t)cs;
    exception->Save();

    appt->Save();
 }

> Show the code you're using.
>
[quoted text clipped - 11 lines]
>> Any
>> idea what is wrong and how to fix the problem?
Ken Slovak - [MVP - Outlook] - 07 Sep 2005 14:32 GMT
Is the problem that you can't retrieve the exceptions past that limit or
that the Outlook view won't show them in day/week/month view? If it's a view
problem then it's not a code problem but a limitation with the view.

Is this running on an Exchange server? If so you might be running into a
limitation of how many open RPC channels can be opened to the server, which
can be changed by changing a registry setting on the server.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Thanks. Here's the code . If the number of exceptions is less than 140,
> all appointment items show in outlook's "day/week/month" view. But if the
[quoted text clipped - 35 lines]
>     appt->Save();
>  }
Chuck Bohling - 07 Sep 2005 21:56 GMT
The problem is that Outlook's day/week/month view  doesn't display them.
They're there, just not displayed. As far as I can tell it's an outlook bug.
I was hoping someone might have a workaround. I tried both exchange and .pst
and they have the identical problem. It actually has something to do with
the size (in bytes) of the exceptions, not the number.

> Is the problem that you can't retrieve the exceptions past that limit or
> that the Outlook view won't show them in day/week/month view? If it's a
[quoted text clipped - 43 lines]
>>     appt->Save();
>>  }
Ken Slovak - [MVP - Outlook] - 08 Sep 2005 16:54 GMT
Then I can't help you and I doubt anyone can. You can try creating a new
custom view and see if that works, otherwise you're stuck.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> The problem is that Outlook's day/week/month view  doesn't display them.
> They're there, just not displayed. As far as I can tell it's an outlook
> bug. I was hoping someone might have a workaround. I tried both exchange
> and .pst and they have the identical problem. It actually has something to
> do with the size (in bytes) of the exceptions, not the number.
Stephen Griffin [MSFT] - 08 Sep 2005 18:45 GMT
Chuck,
Have you narrowed down a property and a size associated with this problem?
It may be a scenario where we need to use OpenProperty to fetch some data
but we're using GetProps instead. We've fixed a few of those recently. Given
a property number (or name if it's a named prop) I can look to see if this
is something we've already fixed.

Steve

> The problem is that Outlook's day/week/month view  doesn't display them.
> They're there, just not displayed. As far as I can tell it's an outlook
[quoted text clipped - 49 lines]
>>>     appt->Save();
>>>  }
Ken Slovak - [MVP - Outlook] - 09 Sep 2005 14:33 GMT
Are you thinking of the 32K limit per pop, Stephen?

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Chuck,
> Have you narrowed down a property and a size associated with this problem?
[quoted text clipped - 4 lines]
>
> Steve
Stephen Griffin [MSFT] - 09 Sep 2005 22:42 GMT
Yeah - with binary props we can only get so much via GetProps - anything
larger and we need to switch to OpenProperty and a streaming interface.

> Are you thinking of the 32K limit per pop, Stephen?
>
[quoted text clipped - 6 lines]
>>
>> Steve
Chuck Bohling - 15 Sep 2005 18:55 GMT
Looks like a  GetProps size problem (8K??) with RecurrenceState (0x8216).
With the test code below, 140 exceptions have a RecurrenceState size of 7762
bytes. But with 150 exceptions, the size is 8332. In that case, OutlookSpy
shows MAPI_E_NOT_ENOUGH_MEMORY. All the exceptions are present in the
attachment table.

> Chuck,
> Have you narrowed down a property and a size associated with this problem?
[quoted text clipped - 59 lines]
>>>>     appt->Save();
>>>>  }
Stephen Griffin [MSFT] - 16 Sep 2005 18:44 GMT
I had to create over 240 exceptions before I got an error
(MAPI_E_CALL_FAILED) trying to save. I never saw a rendering problem though

I'm running Outlook 2003 - outllib.dll ver 11.0.6516.0. What are you
running?

> Looks like a  GetProps size problem (8K??) with RecurrenceState (0x8216).
> With the test code below, 140 exceptions have a RecurrenceState size of
[quoted text clipped - 66 lines]
>>>>>     appt->Save();
>>>>>  }
Chuck Bohling - 17 Sep 2005 00:45 GMT
I'm running 2003. outllib ver ==11.0.6359.0

How big did RecurrenceState get? Over 8K? BTW, outlook 2002 has a similar
problem. But for it, the number was more like 240 exceptions before it ran
into problems. I'll run my test on 2002 again.

>I had to create over 240 exceptions before I got an error
>(MAPI_E_CALL_FAILED) trying to save. I never saw a rendering problem though
[quoted text clipped - 74 lines]
>>>>>>     appt->Save();
>>>>>>  }
Stephen Griffin [MSFT] - 19 Sep 2005 22:09 GMT
If this is something you need fixed, you should consider opening a case so
we can request a hotfix.

> I'm running 2003. outllib ver ==11.0.6359.0
>
[quoted text clipped - 81 lines]
>>>>>>>     appt->Save();
>>>>>>>  }
Chuck Bohling - 19 Sep 2005 23:59 GMT
Yes, I'd like a fix. How do a go about opening a case? Turn's out outlook
2000 has the same problem. Seems like a MAPI_E_NOT_ENOUGH_MEMORY GetProps
problem.

Thanks
chuck

> If this is something you need fixed, you should consider opening a case so
> we can request a hotfix.
[quoted text clipped - 86 lines]
>>>>>>>>     appt->Save();
>>>>>>>>  }
Stephen Griffin [MSFT] - 20 Sep 2005 14:24 GMT
Go up to http://support.microsoft.com/ and look at Assisted Support.

Outlook 2000 is no longer eligible for hotfix support, so you'll have to
live with the problem there. But we may be able to do something for XP or
2003.

> Yes, I'd like a fix. How do a go about opening a case? Turn's out outlook
> 2000 has the same problem. Seems like a MAPI_E_NOT_ENOUGH_MEMORY GetProps
[quoted text clipped - 93 lines]
>>>>>>>>>     appt->Save();
>>>>>>>>>  }
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.