Incorrect Start Dates for Shared Recurring Appointments

J

Jesper

Hi

I have pretty much the problem described in this article :
http://support.microsoft.com/default.aspx?scid=kb;en-us;232534 except that my
problem is I using outlook 2003, and the suggestion on make late binding to
appointment item doesn't resolve the problem. What does solve the problem is
give full rights in the item folder to the user running my program, but that
is not the solution in will implement.

My code look like this:

My input is
Startdate : The startdate from which to return appointments
Lookaheaddays : the number of days to return appointments for
calenders : currently a folderid (later maybe an array of folderid's)

Public Function GetAppointments(Startdate, LookAheadDays, Calenders) As
Variant
Dim count
Dim MyItems
Dim Appointments As Collection
Dim AppItem As Object 'Outlook.AppointmentItem
Dim UserID As String
'Dim UserObj As Outlook.Recipient
Dim MyFolder

MaxTime = DateSerial(DatePart("yyyy", Startdate), DatePart("m",
Startdate), DatePart("d", Startdate) + LookAheadDays)

If Left(Calenders, 4) = "USER" Then
UserID = Mid(Calenders, 6)
If UCase(UserID) = "SELF" Then
Set MyFolder = NameSpace.GetDefaultFolder(9)
Else
Set UserObj = NameSpace.CreateRecipient(UserID)
UserObj.Resolve
If UserObj.Resolved Then
Set MyFolder = NameSpace.GetSharedDefaultFolder(UserObj,
olFolderCalendar)
Else
Set MyFolder = Nothing
End If
End If
Else
'Set MyFolder = NameSpace.GetFolderFromID(Calenders)
Set MyFolder = FindFolderById(Calenders)
End If
If Not MyFolder Is Nothing Then
Set Appointments = New Collection
Set MyItems = MyFolder.Items
MyItems.Sort "[Start]", False
MyItems.IncludeRecurrences = True
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')")
While Not (AppItem Is Nothing)
DoEvents
If (AppItem.Start < MaxTime) Then
If (AppItem.Start >= Startdate) Then
Appointments.Add AppItem
End If
Set AppItem = MyItems.FindNext
Else
Set AppItem = Nothing
End If
Wend
Else
Set Appointments = Nothing
End If
Set AppItem = Nothing
Set MyItems = Nothing
Set MyFolder = Nothing
Set GetAppointments = Appointments
End Function

The Recurring Appointments are included in below statement,
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')")

even that the stated startdato is before the searched startdate, so the
return of appointmest is actually right, but it contains the data of the
first (master) appointment.

What to do???


Another problem is when executing the following (commented in above code
bacuase of workaround)
Set MyFolder = NameSpace.GetFolderFromID(SomeFolderIdOfSharedFolder)
result sometimes in outlook doesn't return a result og returns an outlook
error.
It is even worse when the folderid is of a folder bellonging to another
person, and if the folder is not part of the folderlist in outlook.

In 2003 when open an another users calender by
NameSpace.GetSharedDefaultFolder(UserObj, olFolderCalendar) the folder is
"mounted" in the 2003 panel, which is not always wanted.
 
P

Peter Huang

Hi,
I have pretty much the problem described in this article :
http://support.microsoft.com/default.aspx?scid=kb;en-us;232534 except that my
problem is I using outlook 2003, and the suggestion on make late binding to
appointment item doesn't resolve the problem. What does solve the problem is
give full rights in the item folder to the user running my program, but that
is not the solution in will implement.

Based on my test, if user A wants to access to user B's calendar folder,
user B needs to give user A the reviewer permission as the KB ariticle said.
Here is my test code.
Sub TestRecur()
Dim Recip As Outlook.Recipient
Dim fldr As Outlook.MAPIFolder
Dim CalItems As Outlook.Items
Dim ResItems As Outlook.Items
Dim Appt As Outlook.AppointmentItem

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 abc = CalItems.Find("[Start] > '" & Format("a defined date", "ddddd
h:nn AMPM") & "'")
Set ResItems = CalItems.Restrict("[Subject] = 'test recur'")
For Each Appt In ResItems
Debug.Print Appt.Start
Next
End Sub
The Recurring Appointments are included in below statement,
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')")

even that the stated startdato is before the searched startdate, so the
return of appointmest is actually right, but it contains the data of the
first (master) appointment.

What to do???

I did not understand your meaning very well, what is the behavior on your
now, and what is your expected behavior. Can you descibe the problem more
detailed and a simple reproduce sample and detailed repro steps will be
appreciated.
Another problem is when executing the following (commented in above code
bacuase of workaround)
Set MyFolder = NameSpace.GetFolderFromID(SomeFolderIdOfSharedFolder)
result sometimes in outlook doesn't return a result og returns an outlook
error.
It is even worse when the folderid is of a folder bellonging to another
person, and if the folder is not part of the folderlist in outlook.

Can you give a reproduce code?
In 2003 when open an another users calender by
NameSpace.GetSharedDefaultFolder(UserObj, olFolderCalendar) the folder is
"mounted" in the 2003 panel, which is not always wanted.

I can reproduce the problem and I will try to research the problem and
update you with new information ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jesper

Hi Peter

"Peter Huang" said:
Hi,
I have pretty much the problem described in this article :
http://support.microsoft.com/default.aspx?scid=kb;en-us;232534 except that my
problem is I using outlook 2003, and the suggestion on make late binding to
appointment item doesn't resolve the problem. What does solve the problem is
give full rights in the item folder to the user running my program, but that
is not the solution in will implement.

Based on my test, if user A wants to access to user B's calendar folder,
user B needs to give user A the reviewer permission as the KB ariticle said.
Here is my test code.
Sub TestRecur()
Dim Recip As Outlook.Recipient
Dim fldr As Outlook.MAPIFolder
Dim CalItems As Outlook.Items
Dim ResItems As Outlook.Items
Dim Appt As Outlook.AppointmentItem

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 abc = CalItems.Find("[Start] > '" & Format("a defined date", "ddddd
h:nn AMPM") & "'")
Set ResItems = CalItems.Restrict("[Subject] = 'test recur'")
For Each Appt In ResItems
Debug.Print Appt.Start
Next
End Sub
The Recurring Appointments are included in below statement,
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')")

even that the stated startdato is before the searched startdate, so the
return of appointmest is actually right, but it contains the data of the
first (master) appointment.

What to do???

I did not understand your meaning very well, what is the behavior on your
now, and what is your expected behavior. Can you descibe the problem more
detailed and a simple reproduce sample and detailed repro steps will be
appreciated.

My behavior is that the recurring appointment returned looks like it's the
master appointment (also look at recurrencestate which is stated as
olapptmaster). Expected behavior is appoinment returned containes statdate of
where the recurring appoinment actually is.

What I did try to tell is the appointment is expected but not with the
master data. In my example I have a master app. at 26 of marts. A recurring
app comes at 24 sep.
The statement (Startdate variable contains 20 sep.
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')") 'Find first app with start one day before Value in
startdate.
return the expected recurring app at 24 sep (The master is way before start
date in find), but contains the master data.

The senarie is a user looking in a globale public folder containing
appointments, but the user has only reviewer rights. In this senarie it
fails. If the user is granted owner rights the senarie is working as expected.

Hope that helps explaining my problem.
Can you give a reproduce code?

The code causing the error is actually the one stated above. The result of
the call was different depending of the outlook ver. and type of folder. As I
remember, It will not work as expected in 2003 if you call it with an folder
id of another users calender folder (and the folder was not "moundet" in the
folder panel)
If nesscary I can try test some senaries again, but it's not always easy
having more test platform with different user right. Most of the result came
from respones in a wide inhouse test, and actually could one senary work one
time and fail few hours later.
I can reproduce the problem and I will try to research the problem and
update you with new information ASAP.
Nice, hope this can be resolved.

Hope to hear from you again soon.
 
P

Peter Huang

Hi,
My behavior is that the recurring appointment returned looks like it's the
master appointment (also look at recurrencestate which is stated as
olapptmaster). Expected behavior is appoinment returned containes statdate of
where the recurring appoinment actually is.

What I did try to tell is the appointment is expected but not with the
master data. In my example I have a master app. at 26 of marts. A recurring
app comes at 24 sep.
The statement (Startdate variable contains 20 sep.
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')") 'Find first app with start one day before Value in
startdate.
return the expected recurring app at 24 sep (The master is way before start
date in find), but contains the master data.

The senarie is a user looking in a globale public folder containing
appointments, but the user has only reviewer rights. In this senarie it
fails. If the user is granted owner rights the senarie is working as expected.

Hope that helps explaining my problem.
Based on my understanding, provided you have a recurring appointment which
will span 4 months from 5.1 to 9.1 once every two weeks. Now you find
according to the condition that appointment is from 7.1-7.30 and you get
one hit. But the returned appointment is created on 5.1. If I have any
misunderstanding, please feel free to let me know.

Based on my knowledge, when we create an recurring appointment, although it
seems to be many appointments, it is named as recurrence pattern. You may
check it in the calendar box by selecting View/Arrange By/Current
View/Recurring Appointments. Actually there is only one appointment in the
calendar folder, because of its recurring pattern, it seems that it has
many. I think this bahavior is by design.
The code causing the error is actually the one stated above. The result of
the call was different depending of the outlook ver. and type of folder. As I
remember, It will not work as expected in 2003 if you call it with an folder
id of another users calender folder (and the folder was not "moundet" in the
folder panel)
If nesscary I can try test some senaries again, but it's not always easy
having more test platform with different user right. Most of the result came
from respones in a wide inhouse test, and actually could one senary work one
time and fail few hours later.
Based on my test, the reviewer right is enough. You may try to open another
user's calendar folder by using the outlook UI, if that did not work, I
think you may need to contact MS PSS for further troubleshooting becasue
this queue is for programming issue only.
You may open another's folder by using File/Open/Other user's folder.

http://support.microsoft.com

Thanks for your understanding.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jesper

"Peter Huang" said:
Hi,
My behavior is that the recurring appointment returned looks like it's the
master appointment (also look at recurrencestate which is stated as
olapptmaster). Expected behavior is appoinment returned containes statdate of
where the recurring appoinment actually is.

What I did try to tell is the appointment is expected but not with the
master data. In my example I have a master app. at 26 of marts. A recurring
app comes at 24 sep.
The statement (Startdate variable contains 20 sep.
Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d", -1,
Startdate)) & "')") 'Find first app with start one day before Value in
startdate.
return the expected recurring app at 24 sep (The master is way before start
date in find), but contains the master data.

The senarie is a user looking in a globale public folder containing
appointments, but the user has only reviewer rights. In this senarie it
fails. If the user is granted owner rights the senarie is working as expected.

Hope that helps explaining my problem.
Based on my understanding, provided you have a recurring appointment which
will span 4 months from 5.1 to 9.1 once every two weeks. Now you find
according to the condition that appointment is from 7.1-7.30 and you get
one hit. But the returned appointment is created on 5.1. If I have any
misunderstanding, please feel free to let me know.
In the senary you descripe (between 7.1 and 7.30 if recurrs every 2 weeks)
there should be at least 2 recurrent apps, but yes.. That the problem. I get
the expected app, but contains data from the master, meaning that I can't se
on what date it recurs. Just like descriped in this article :
http://support.microsoft.com/default.aspx?scid=kb;en-us;232534
Based on my knowledge, when we create an recurring appointment, although it
seems to be many appointments, it is named as recurrence pattern. You may
check it in the calendar box by selecting View/Arrange By/Current
View/Recurring Appointments. Actually there is only one appointment in the
calendar folder, because of its recurring pattern, it seems that it has
many. I think this bahavior is by design.
I am aware of that. And because I don't want to calculate the recurrences
myself from the given recurrence pattern, I use the IncludeRecurrences = True
property on my folder object, that should do the work, but unfortunally
returns wrong data in recurreced app's.
Based on my test, the reviewer right is enough. You may try to open another
user's calendar folder by using the outlook UI, if that did not work, I
think you may need to contact MS PSS for further troubleshooting becasue
this queue is for programming issue only.
You may open another's folder by using File/Open/Other user's folder.
I am able to open by outlook ui, but sometimes the getfolderbyid method
caused an error.. anyway Leave that alone.. I have found a workaround for
that...
By is is essential I will get a solution for the wrong data in recurrenced
appointments.

Thanks for help.. Hope we can find a solution.
 
P

Peter Huang

Hi,

Now I am researching the issue to see if there is other way to do the job.
Thank you for your understanding.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Y

Yan-Hong Huang[MSFT]

Hello,

This issue is quite complicated. We have performed much research but got no
further update yet. Currently we are contacting outlook supporting team and
one support engineer will look into it for us. We will rerutn with more
information as soon as possible.

Thanks very much for your patience.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

Karen Anderson

Hi,

My name is Karen Anderson and I will be working with you on your newsgroup
issue from here. I am a member of Developer Support for Messaging at
Microsoft.

I have reviewed the thread that has occurred on this issue and I apologize
if I need to back up and rehash items which you may have already discussed.
I need to do this to ensure that I have an accurate description of the
behavior you are experiencing.

I am aware that you have looked at the article indicating that you must
declare the Outlook::AppointmentItem as an object and use late binding in
order to return the correct date of the recurring items.

OL2000: Incorrect Start Dates for Shared Recurring Appointments (232534)
http://support.microsoft.com/?id=232534

I have tested this information and it is still true for Outlook 2003. Here
are the steps that I have performed to test this issue:
1 - Logon to Outlook as User1
2 - Create a recurring appointment starting today, 10/1 at 3pm PDT and
recurring for 3 days (10/1-10/3).
3 - Add User2 to the permissions tab of the Calendar. Set the permissions
to None.
4 - Logon to Outlook as User2 and run the following code. The code fails
as I do not have access to User1's Calendar.
5 - Logon to Outlook as User1 and change User2's permissions to Reviewer.
6 - Logon to Outlook as User2 and run the following code. The result is:
10/1/2004 3:00:00 PM
10/2/2004 3:00:00 PM
10/3/2004 3:00:00 PM

7 - Change the code to use early binding and the results is:
10/1/2004 3:00:00 PM
10/1/2004 3:00:00 PM
10/1/2004 3:00:00 PM

===========================================

I am not getting a repro of the problem you indicate about the dates not
being correct. Can you run the code that I am sending and let me know the
results?

You also mention the following other issues:

- When using GetFolderFromID, you receive an error. To use
GetFolderFromID, the folder must be loaded within the profile and cannot be
a shared folder. If you are attempting to access a shared folder which you
do not have logon permissions to, you will get an error. Most likely, you
are getting the error "Could not open the item. Try again." or "Run-time
error '-1698562039 (9ac20009)'. This is because the folder is not within
the profile which is necessary to use this method. This is why the
GetSharedDefaultFolder exists.

Using GetFolderFromID will also fail if you attempt to access a Public
Folder and the Public Folder list has not been "loaded" or expanded during
the current session. Outlook will not be able to directly access the
folder until the tree is expanded. To work around this, you call traverse
the folders to get to the folder you are looking for.

- When you use GetSharedDefaultFolder, it adds the folder in the "Other
Calendars" listing of the Calendar folder view. This is a result of using
this method and there is no way to work around it. It was considered a
feature as many people wanted past calendars that they queried to be
available here without them having to add them back each time.
Unfortunately, the opposite is what you are looking for and the bad news is
that you cannot prohibit this from occurring when calling this method.


' ============================ BEGIN SAMPLE CODE
============================
' WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS MESSAGE IS AT YOUR
OWN RISK.
' Microsoft provides this code "as is" without warranty of any kind, either
expressed or implied.
Sub TestRecur()
Dim Recip As Outlook.recipient
Dim fldr As Outlook.MAPIFolder
Dim CalItems As Outlook.items
'Dim AppItem As Outlook.AppointmentItem
Dim AppItem As Object

Set Recip = Application.session.CreateRecipient("test6")
Recip.Resolve
Set fldr = Application.session.GetSharedDefaultFolder(Recip,
olFolderCalendar)

Set CalItems = fldr.items
CalItems.Sort "[Start]"
CalItems.IncludeRecurrences = True
Set AppItem = CalItems.Find(" ([Start] >= '" & Date & "')")

While Not AppItem Is Nothing
Debug.Print AppItem.Start
Set AppItem = CalItems.FindNext
Wend
End Sub
' ============================ END SAMPLE CODE ============================


Karen Anderson
Microsoft, Developer Support Engineer - Windows Messaging / Outlook

Please do not send email directly to this alias. This alias is for
newsgroup purposes only.

Disclaimer: This posting is provided "AS IS" with no warranties, and
confers no rights.
--------------------
| Thread-Topic: Incorrect Start Dates for Shared Recurring Appointments
| thread-index: AcSiPLKljppdXVyaTiiDwgwrE1Tydw==
| X-WBNR-Posting-Host: 195.41.215.252
| From: =?Utf-8?B?SmVzcGVy?= <[email protected]>
| Subject: Incorrect Start Dates for Shared Recurring Appointments
| Date: Fri, 24 Sep 2004 06:45:05 -0700
| Lines: 96
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.office.developer.automation
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.office.developer.automation:9658
| X-Tomcat-NG: microsoft.public.office.developer.automation
|
| Hi
|
| I have pretty much the problem described in this article :
| http://support.microsoft.com/default.aspx?scid=kb;en-us;232534 except
that my
| problem is I using outlook 2003, and the suggestion on make late binding
to
| appointment item doesn't resolve the problem. What does solve the
problem is
| give full rights in the item folder to the user running my program, but
that
| is not the solution in will implement.
|
| My code look like this:
|
| My input is
| Startdate : The startdate from which to return appointments
| Lookaheaddays : the number of days to return appointments for
| calenders : currently a folderid (later maybe an array of folderid's)
|
| Public Function GetAppointments(Startdate, LookAheadDays, Calenders) As
| Variant
| Dim count
| Dim MyItems
| Dim Appointments As Collection
| Dim AppItem As Object 'Outlook.AppointmentItem
| Dim UserID As String
| 'Dim UserObj As Outlook.Recipient
| Dim MyFolder
|
| MaxTime = DateSerial(DatePart("yyyy", Startdate), DatePart("m",
| Startdate), DatePart("d", Startdate) + LookAheadDays)
|
| If Left(Calenders, 4) = "USER" Then
| UserID = Mid(Calenders, 6)
| If UCase(UserID) = "SELF" Then
| Set MyFolder = NameSpace.GetDefaultFolder(9)
| Else
| Set UserObj = NameSpace.CreateRecipient(UserID)
| UserObj.Resolve
| If UserObj.Resolved Then
| Set MyFolder = NameSpace.GetSharedDefaultFolder(UserObj,
| olFolderCalendar)
| Else
| Set MyFolder = Nothing
| End If
| End If
| Else
| 'Set MyFolder = NameSpace.GetFolderFromID(Calenders)
| Set MyFolder = FindFolderById(Calenders)
| End If
| If Not MyFolder Is Nothing Then
| Set Appointments = New Collection
| Set MyItems = MyFolder.Items
| MyItems.Sort "[Start]", False
| MyItems.IncludeRecurrences = True
| Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d",
-1,
| Startdate)) & "')")
| While Not (AppItem Is Nothing)
| DoEvents
| If (AppItem.Start < MaxTime) Then
| If (AppItem.Start >= Startdate) Then
| Appointments.Add AppItem
| End If
| Set AppItem = MyItems.FindNext
| Else
| Set AppItem = Nothing
| End If
| Wend
| Else
| Set Appointments = Nothing
| End If
| Set AppItem = Nothing
| Set MyItems = Nothing
| Set MyFolder = Nothing
| Set GetAppointments = Appointments
| End Function
|
| The Recurring Appointments are included in below statement,
| Set AppItem = MyItems.Find(" ([Start] >= '" & CStr(DateAdd("d",
-1,
| Startdate)) & "')")
|
| even that the stated startdato is before the searched startdate, so the
| return of appointmest is actually right, but it contains the data of the
| first (master) appointment.
|
| What to do???
|
|
| Another problem is when executing the following (commented in above code
| bacuase of workaround)
| Set MyFolder = NameSpace.GetFolderFromID(SomeFolderIdOfSharedFolder)
| result sometimes in outlook doesn't return a result og returns an outlook
| error.
| It is even worse when the folderid is of a folder bellonging to another
| person, and if the folder is not part of the folderlist in outlook.
|
| In 2003 when open an another users calender by
| NameSpace.GetSharedDefaultFolder(UserObj, olFolderCalendar) the folder is
| "mounted" in the 2003 panel, which is not always wanted.
|
 
J

Jesper

Hi Karen

Thanks for the nice answers.

Karen Anderson said:
Hi,

My name is Karen Anderson and I will be working with you on your newsgroup
issue from here. I am a member of Developer Support for Messaging at
Microsoft.

I have reviewed the thread that has occurred on this issue and I apologize
if I need to back up and rehash items which you may have already discussed.
I need to do this to ensure that I have an accurate description of the
behavior you are experiencing.

I am aware that you have looked at the article indicating that you must
declare the Outlook::AppointmentItem as an object and use late binding in
order to return the correct date of the recurring items.

OL2000: Incorrect Start Dates for Shared Recurring Appointments (232534)
http://support.microsoft.com/?id=232534

I have tested this information and it is still true for Outlook 2003. Here
are the steps that I have performed to test this issue:
1 - Logon to Outlook as User1
2 - Create a recurring appointment starting today, 10/1 at 3pm PDT and
recurring for 3 days (10/1-10/3).
3 - Add User2 to the permissions tab of the Calendar. Set the permissions
to None.
4 - Logon to Outlook as User2 and run the following code. The code fails
as I do not have access to User1's Calendar.
5 - Logon to Outlook as User1 and change User2's permissions to Reviewer.
6 - Logon to Outlook as User2 and run the following code. The result is:
10/1/2004 3:00:00 PM
10/2/2004 3:00:00 PM
10/3/2004 3:00:00 PM

7 - Change the code to use early binding and the results is:
10/1/2004 3:00:00 PM
10/1/2004 3:00:00 PM
10/1/2004 3:00:00 PM

===========================================

I am not getting a repro of the problem you indicate about the dates not
being correct. Can you run the code that I am sending and let me know the
results?
I tried you code with some username midifications, and it did work. Then I
look at my own code again an find that in last test there was early binding.
I tried my code with late binding, at the senary seems to work. Hope I was
mistaken instead of a senary where it dosn't work. I Try it here from at hope
to get the expected results.

You also mention the following other issues:

- When using GetFolderFromID, you receive an error. To use
GetFolderFromID, the folder must be loaded within the profile and cannot be
a shared folder. If you are attempting to access a shared folder which you
do not have logon permissions to, you will get an error. Most likely, you
are getting the error "Could not open the item. Try again." or "Run-time
error '-1698562039 (9ac20009)'. This is because the folder is not within
the profile which is necessary to use this method. This is why the
GetSharedDefaultFolder exists.
Using GetFolderFromID will also fail if you attempt to access a Public
Folder and the Public Folder list has not been "loaded" or expanded during
the current session. Outlook will not be able to directly access the
folder until the tree is expanded. To work around this, you call traverse
the folders to get to the folder you are looking for.

Ok, I did nok know, and I haven't seen that as an limitation in the
description of the method call.
My workaround was in fact a traverse og the users folders.
- When you use GetSharedDefaultFolder, it adds the folder in the "Other
Calendars" listing of the Calendar folder view. This is a result of using
this method and there is no way to work around it. It was considered a
feature as many people wanted past calendars that they queried to be
available here without them having to add them back each time.
Unfortunately, the opposite is what you are looking for and the bad news is
that you cannot prohibit this from occurring when calling this method.
Sad, Is it possible to ask microsoft for such a possibillity in later
releases??

Regards Jesper
 
K

Karen Anderson

Hi Jesper,

Thank you for your follow up. I am glad to hear that the sample code that
I provided has been helpful to you to resolve your problem. We do have an
external email available to customers to send comments and suggestions for
product features, etc. It is viewed by our Product Group and helps us get
feedback that we may never otherwise receive. If you are interested in
sending your comments, the alias is (e-mail address removed).

As the problem seems resolved, I will go ahead and close this newgroup
issue.

Karen Anderson
Microsoft, Developer Support Engineer - Windows Messaging / Outlook

Please do not send email directly to this alias. This alias is for
newsgroup purposes only.

Disclaimer: This posting is provided "AS IS" with no warranties, and
confers no rights.
--------------------
| Thread-Topic: Incorrect Start Dates for Shared Recurring Appointments
| thread-index: AcSruO6bBmfjBSGmRPCDZMTTB1TaxQ==
| X-WBNR-Posting-Host: 195.41.215.252
| From: =?Utf-8?B?SmVzcGVy?= <[email protected]>
| References: <[email protected]>
<1#[email protected]>
| Subject: RE: Incorrect Start Dates for Shared Recurring Appointments
| Date: Wed, 6 Oct 2004 08:27:03 -0700
| Lines: 88
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.office.developer.automation
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.office.developer.automation:9718
| X-Tomcat-NG: microsoft.public.office.developer.automation
|
| Hi Karen
|
| Thanks for the nice answers.
|
| "Karen Anderson" wrote:
|
| > Hi,
| >
| > My name is Karen Anderson and I will be working with you on your
newsgroup
| > issue from here. I am a member of Developer Support for Messaging at
| > Microsoft.
| >
| > I have reviewed the thread that has occurred on this issue and I
apologize
| > if I need to back up and rehash items which you may have already
discussed.
| > I need to do this to ensure that I have an accurate description of the
| > behavior you are experiencing.
| >
| > I am aware that you have looked at the article indicating that you must
| > declare the Outlook::AppointmentItem as an object and use late binding
in
| > order to return the correct date of the recurring items.
| >
| > OL2000: Incorrect Start Dates for Shared Recurring Appointments (232534)
| > http://support.microsoft.com/?id=232534
| >
| > I have tested this information and it is still true for Outlook 2003.
Here
| > are the steps that I have performed to test this issue:
| > 1 - Logon to Outlook as User1
| > 2 - Create a recurring appointment starting today, 10/1 at 3pm PDT and
| > recurring for 3 days (10/1-10/3).
| > 3 - Add User2 to the permissions tab of the Calendar. Set the
permissions
| > to None.
| > 4 - Logon to Outlook as User2 and run the following code. The code
fails
| > as I do not have access to User1's Calendar.
| > 5 - Logon to Outlook as User1 and change User2's permissions to
Reviewer.
| > 6 - Logon to Outlook as User2 and run the following code. The result
is:
| > 10/1/2004 3:00:00 PM
| > 10/2/2004 3:00:00 PM
| > 10/3/2004 3:00:00 PM
| >
| > 7 - Change the code to use early binding and the results is:
| > 10/1/2004 3:00:00 PM
| > 10/1/2004 3:00:00 PM
| > 10/1/2004 3:00:00 PM
| >
| > ===========================================
| >
| > I am not getting a repro of the problem you indicate about the dates
not
| > being correct. Can you run the code that I am sending and let me know
the
| > results?
| I tried you code with some username midifications, and it did work. Then
I
| look at my own code again an find that in last test there was early
binding.
| I tried my code with late binding, at the senary seems to work. Hope I
was
| mistaken instead of a senary where it dosn't work. I Try it here from at
hope
| to get the expected results.
|
|
| > You also mention the following other issues:
| >
| > - When using GetFolderFromID, you receive an error. To use
| > GetFolderFromID, the folder must be loaded within the profile and
cannot be
| > a shared folder. If you are attempting to access a shared folder which
you
| > do not have logon permissions to, you will get an error. Most likely,
you
| > are getting the error "Could not open the item. Try again." or
"Run-time
| > error '-1698562039 (9ac20009)'. This is because the folder is not
within
| > the profile which is necessary to use this method. This is why the
| > GetSharedDefaultFolder exists.
|
| > Using GetFolderFromID will also fail if you attempt to access a Public
| > Folder and the Public Folder list has not been "loaded" or expanded
during
| > the current session. Outlook will not be able to directly access the
| > folder until the tree is expanded. To work around this, you call
traverse
| > the folders to get to the folder you are looking for.
|
| Ok, I did nok know, and I haven't seen that as an limitation in the
| description of the method call.
| My workaround was in fact a traverse og the users folders.
|
| > - When you use GetSharedDefaultFolder, it adds the folder in the "Other
| > Calendars" listing of the Calendar folder view. This is a result of
using
| > this method and there is no way to work around it. It was considered a
| > feature as many people wanted past calendars that they queried to be
| > available here without them having to add them back each time.
| > Unfortunately, the opposite is what you are looking for and the bad
news is
| > that you cannot prohibit this from occurring when calling this method.
| Sad, Is it possible to ask microsoft for such a possibillity in later
| releases??
|
| Regards Jesper
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top