![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#31
|
|||
|
|||
![]()
Sorry, Dmitry, but I think you didn`t try the code :-(
The reminder starts 5 days ago and the reminder comes up for the last night. In OOM the Recurrence Pattern is "every November 4" in RDO "every November 9 effective 11/4/2007" Peter On 9 Nov., 17:43, "Dmitry Streblechenko" wrote: AllDayEvent means it starts at midnight, so by default (unless you set it otherwise) the reminder time will be set to 15 minutes before the start. You can explicitly set the ReminderTime property if you want full control over the reminder. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... You can see what I mean, if you use the following code: Sub CreateAppointments() Dim objSession As Object Dim objAppointments As Object Dim objAppointment As Object Set objSession = CreateObject("Redemption.RDOSession") objSession.MAPIOBJECT = Outlook.Session.MAPIOBJECT Set objAppointment = objSession.GetDefaultFolder(olFolderCalendar).Item s.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = Date - 5 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = Date - 5 objRecPattern.NoEndDate = True .Save End With End Sub A reminder comes up from midnight of the last day. Redemption version is 4.5.0.730. Peter On 8 Nov., 21:35, "Dmitry Streblechenko" wrote: I am not sure what you mean by "but not appear when creating the items". Do you mean it shoudl nto appear while your codei is still running in a loop creating items? Why shouldn't Outlook display a reminder? I would imagine if you are using OOM, it physically cannot do so since it is busy with your script, but RDO does not use Outlook, so it is free to display a reminder. As for the recurrence description, what version of Redemption are you using? Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... The reminder should not be deactivated, but not appear when creating the items. With the code for OOM this is ok, with the same code in RDO the description of the appointments is different and the reminder for all created items appears. I think there is the problem. Why could this be if the code is the same? Peter On 8 Nov., 18:28, "Dmitry Streblechenko" wrote: Try to set RDOAppointmentItem.ReminderSet to false Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thank you Dmitry, this works fine. But I have another problem. In the code I create recurrence appointments: Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = dtmBirthday objRecPattern.NoEndDate = True With the OOM the description of the appointment is (translated) "This appointment occurs every year on the 25th October, starting on 25th October 2007" and no reminder comes up. Same code with RDO (objRecPattern then is dimed as object not longer as Outlook.RecurrencePattern) set the description to "This appointment occurs every year on the 25th October, in the period from 25.10.2007 to 02.01.4501." and a reminder comes up. So may be I have to set one more parameter in RDO? Peter On 7 Nov., 19:05, "Dmitry Streblechenko" wrote: I meant the RDO family of objects, which does not rely on OOM at all. You will need to change the variable declarations appropriately and use something like set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Outlook.Session.MAPIOBJECT 'make them both use the same session set objContacts = Session.GetDefaultFolder(olFolderContacts).Items set objAppointments =Session.GetDefaultFolder(olFolderCalendar).Items ... Next version of Redemption will keep track of the open MAPI objects and automatically release them when the number gets too high (they are transparently reopened on demand), so you won't have to go through the trouble of setting all objects to Nothing. Send me an e-mail if you want a beta. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... How to do that? This code occurs the same error: Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Dim objAppointments As Outlook.Items Dim objApp As Outlook.AppointmentItem Dim colLinks As Outlook.Links Dim objLink As Outlook.Link Dim objSafeApp As Object Set objAppointments = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items Set objSafeApp = CreateObject("SafeOutlook.SecureAppointment") Set objApp = objAppointments.Add objApp.Save objSafeApp.Item = objApp Set colLinks = objSafeApp.Links With objSafeApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing Set objContact = Nothing Set objSafeApp.Item = Nothing Set objSafeApp = Nothing End Sub Peter On 7 Nov., 07:11, "Dmitry Streblechenko" wrote: I can only suggest to use Redemption, which does not leave hanging references... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thanks for your idea, Ken. I`m sorry, but there is no change. Peter On 6 Nov., 21:47, "Ken Slovak - [MVP - Outlook]" wrote: Peter, see if this is any better: Public objContacts As Outlook.Items Public objContact As Outlook.ContactItem Public objAppointments As Outlook.Items Public objApp As Outlook.AppointmentItem Public colLinks As Outlook.Links Public objLink As Outlook.Link Sub Test() Dim oNS As Outlook.NameSpace Set oNS = Outlook.GetNameSpace("MAPI") Set objContacts = _ oNS.GetDefaultFolder(olFolderContacts).Items Set objAppointments = _ oNS.GetDefaultFolder(olFolderCalendar).Items Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) Set objContacts = Nothing Set objContact = Nothing Set objAppointments = Nothing Set objApp = Nothing Set colLinks = Nothing Set objLink = Nothing End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As Long) Dim lngIndex As Long For lngIndex = lngFrom To lngTo Set objContact = objContacts.Item(lngIndex) Call AddAppointment(objContact) Set objContact = Nothing Next End Sub Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Set objApp = objAppointments.Add Set colLinks = objApp.Links With objApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing End Sub -- Ken Slovak [MVP - Outlook]http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm "Peter Marchert" wrote in message groups.com.... Thank you Dmitry, but the error is still the Sub Test() Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As Long) Dim objContacts As Outlook.Items ... Erfahren Sie mehr »- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
Ads |
#32
|
|||
|
|||
![]()
Hmmm... I can reproduce this, let me play with this later tonight...
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ps.com... Sorry, Dmitry, but I think you didn`t try the code :-( The reminder starts 5 days ago and the reminder comes up for the last night. In OOM the Recurrence Pattern is "every November 4" in RDO "every November 9 effective 11/4/2007" Peter On 9 Nov., 17:43, "Dmitry Streblechenko" wrote: AllDayEvent means it starts at midnight, so by default (unless you set it otherwise) the reminder time will be set to 15 minutes before the start. You can explicitly set the ReminderTime property if you want full control over the reminder. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... You can see what I mean, if you use the following code: Sub CreateAppointments() Dim objSession As Object Dim objAppointments As Object Dim objAppointment As Object Set objSession = CreateObject("Redemption.RDOSession") objSession.MAPIOBJECT = Outlook.Session.MAPIOBJECT Set objAppointment = objSession.GetDefaultFolder(olFolderCalendar).Item s.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = Date - 5 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = Date - 5 objRecPattern.NoEndDate = True .Save End With End Sub A reminder comes up from midnight of the last day. Redemption version is 4.5.0.730. Peter On 8 Nov., 21:35, "Dmitry Streblechenko" wrote: I am not sure what you mean by "but not appear when creating the items". Do you mean it shoudl nto appear while your codei is still running in a loop creating items? Why shouldn't Outlook display a reminder? I would imagine if you are using OOM, it physically cannot do so since it is busy with your script, but RDO does not use Outlook, so it is free to display a reminder. As for the recurrence description, what version of Redemption are you using? Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... The reminder should not be deactivated, but not appear when creating the items. With the code for OOM this is ok, with the same code in RDO the description of the appointments is different and the reminder for all created items appears. I think there is the problem. Why could this be if the code is the same? Peter On 8 Nov., 18:28, "Dmitry Streblechenko" wrote: Try to set RDOAppointmentItem.ReminderSet to false Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thank you Dmitry, this works fine. But I have another problem. In the code I create recurrence appointments: Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = dtmBirthday objRecPattern.NoEndDate = True With the OOM the description of the appointment is (translated) "This appointment occurs every year on the 25th October, starting on 25th October 2007" and no reminder comes up. Same code with RDO (objRecPattern then is dimed as object not longer as Outlook.RecurrencePattern) set the description to "This appointment occurs every year on the 25th October, in the period from 25.10.2007 to 02.01.4501." and a reminder comes up. So may be I have to set one more parameter in RDO? Peter On 7 Nov., 19:05, "Dmitry Streblechenko" wrote: I meant the RDO family of objects, which does not rely on OOM at all. You will need to change the variable declarations appropriately and use something like set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Outlook.Session.MAPIOBJECT 'make them both use the same session set objContacts = Session.GetDefaultFolder(olFolderContacts).Items set objAppointments =Session.GetDefaultFolder(olFolderCalendar).Items ... Next version of Redemption will keep track of the open MAPI objects and automatically release them when the number gets too high (they are transparently reopened on demand), so you won't have to go through the trouble of setting all objects to Nothing. Send me an e-mail if you want a beta. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... How to do that? This code occurs the same error: Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Dim objAppointments As Outlook.Items Dim objApp As Outlook.AppointmentItem Dim colLinks As Outlook.Links Dim objLink As Outlook.Link Dim objSafeApp As Object Set objAppointments = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items Set objSafeApp = CreateObject("SafeOutlook.SecureAppointment") Set objApp = objAppointments.Add objApp.Save objSafeApp.Item = objApp Set colLinks = objSafeApp.Links With objSafeApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing Set objContact = Nothing Set objSafeApp.Item = Nothing Set objSafeApp = Nothing End Sub Peter On 7 Nov., 07:11, "Dmitry Streblechenko" wrote: I can only suggest to use Redemption, which does not leave hanging references... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thanks for your idea, Ken. I`m sorry, but there is no change. Peter On 6 Nov., 21:47, "Ken Slovak - [MVP - Outlook]" wrote: Peter, see if this is any better: Public objContacts As Outlook.Items Public objContact As Outlook.ContactItem Public objAppointments As Outlook.Items Public objApp As Outlook.AppointmentItem Public colLinks As Outlook.Links Public objLink As Outlook.Link Sub Test() Dim oNS As Outlook.NameSpace Set oNS = Outlook.GetNameSpace("MAPI") Set objContacts = _ oNS.GetDefaultFolder(olFolderContacts).Items Set objAppointments = _ oNS.GetDefaultFolder(olFolderCalendar).Items Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) Set objContacts = Nothing Set objContact = Nothing Set objAppointments = Nothing Set objApp = Nothing Set colLinks = Nothing Set objLink = Nothing End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As Long) Dim lngIndex As Long For lngIndex = lngFrom To lngTo Set objContact = objContacts.Item(lngIndex) Call AddAppointment(objContact) Set objContact = Nothing Next End Sub Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Set objApp = objAppointments.Add Set colLinks = objApp.Links With objApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing End Sub -- Ken Slovak [MVP - Outlook]http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm "Peter Marchert" wrote in message groups.com... Thank you Dmitry, but the error is still the Sub Test() Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As Long) Dim objContacts As Outlook.Items ... Erfahren Sie mehr »- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#33
|
|||
|
|||
![]()
Ah! I see what the problem is. You can work around this by setting the
RecurrencePattern.DayOfMonth property explicitly Or send me an e-mail if you want an updated version... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Dmitry Streblechenko" wrote in message ... Hmmm... I can reproduce this, let me play with this later tonight... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ps.com... Sorry, Dmitry, but I think you didn`t try the code :-( The reminder starts 5 days ago and the reminder comes up for the last night. In OOM the Recurrence Pattern is "every November 4" in RDO "every November 9 effective 11/4/2007" Peter On 9 Nov., 17:43, "Dmitry Streblechenko" wrote: AllDayEvent means it starts at midnight, so by default (unless you set it otherwise) the reminder time will be set to 15 minutes before the start. You can explicitly set the ReminderTime property if you want full control over the reminder. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... You can see what I mean, if you use the following code: Sub CreateAppointments() Dim objSession As Object Dim objAppointments As Object Dim objAppointment As Object Set objSession = CreateObject("Redemption.RDOSession") objSession.MAPIOBJECT = Outlook.Session.MAPIOBJECT Set objAppointment = objSession.GetDefaultFolder(olFolderCalendar).Item s.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = Date - 5 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = Date - 5 objRecPattern.NoEndDate = True .Save End With End Sub A reminder comes up from midnight of the last day. Redemption version is 4.5.0.730. Peter On 8 Nov., 21:35, "Dmitry Streblechenko" wrote: I am not sure what you mean by "but not appear when creating the items". Do you mean it shoudl nto appear while your codei is still running in a loop creating items? Why shouldn't Outlook display a reminder? I would imagine if you are using OOM, it physically cannot do so since it is busy with your script, but RDO does not use Outlook, so it is free to display a reminder. As for the recurrence description, what version of Redemption are you using? Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... The reminder should not be deactivated, but not appear when creating the items. With the code for OOM this is ok, with the same code in RDO the description of the appointments is different and the reminder for all created items appears. I think there is the problem. Why could this be if the code is the same? Peter On 8 Nov., 18:28, "Dmitry Streblechenko" wrote: Try to set RDOAppointmentItem.ReminderSet to false Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thank you Dmitry, this works fine. But I have another problem. In the code I create recurrence appointments: Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = dtmBirthday objRecPattern.NoEndDate = True With the OOM the description of the appointment is (translated) "This appointment occurs every year on the 25th October, starting on 25th October 2007" and no reminder comes up. Same code with RDO (objRecPattern then is dimed as object not longer as Outlook.RecurrencePattern) set the description to "This appointment occurs every year on the 25th October, in the period from 25.10.2007 to 02.01.4501." and a reminder comes up. So may be I have to set one more parameter in RDO? Peter On 7 Nov., 19:05, "Dmitry Streblechenko" wrote: I meant the RDO family of objects, which does not rely on OOM at all. You will need to change the variable declarations appropriately and use something like set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Outlook.Session.MAPIOBJECT 'make them both use the same session set objContacts = Session.GetDefaultFolder(olFolderContacts).Items set objAppointments =Session.GetDefaultFolder(olFolderCalendar).Items ... Next version of Redemption will keep track of the open MAPI objects and automatically release them when the number gets too high (they are transparently reopened on demand), so you won't have to go through the trouble of setting all objects to Nothing. Send me an e-mail if you want a beta. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... How to do that? This code occurs the same error: Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Dim objAppointments As Outlook.Items Dim objApp As Outlook.AppointmentItem Dim colLinks As Outlook.Links Dim objLink As Outlook.Link Dim objSafeApp As Object Set objAppointments = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items Set objSafeApp = CreateObject("SafeOutlook.SecureAppointment") Set objApp = objAppointments.Add objApp.Save objSafeApp.Item = objApp Set colLinks = objSafeApp.Links With objSafeApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing Set objContact = Nothing Set objSafeApp.Item = Nothing Set objSafeApp = Nothing End Sub Peter On 7 Nov., 07:11, "Dmitry Streblechenko" wrote: I can only suggest to use Redemption, which does not leave hanging references... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thanks for your idea, Ken. I`m sorry, but there is no change. Peter On 6 Nov., 21:47, "Ken Slovak - [MVP - Outlook]" wrote: Peter, see if this is any better: Public objContacts As Outlook.Items Public objContact As Outlook.ContactItem Public objAppointments As Outlook.Items Public objApp As Outlook.AppointmentItem Public colLinks As Outlook.Links Public objLink As Outlook.Link Sub Test() Dim oNS As Outlook.NameSpace Set oNS = Outlook.GetNameSpace("MAPI") Set objContacts = _ oNS.GetDefaultFolder(olFolderContacts).Items Set objAppointments = _ oNS.GetDefaultFolder(olFolderCalendar).Items Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) Set objContacts = Nothing Set objContact = Nothing Set objAppointments = Nothing Set objApp = Nothing Set colLinks = Nothing Set objLink = Nothing End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As Long) Dim lngIndex As Long For lngIndex = lngFrom To lngTo Set objContact = objContacts.Item(lngIndex) Call AddAppointment(objContact) Set objContact = Nothing Next End Sub Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Set objApp = objAppointments.Add Set colLinks = objApp.Links With objApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing End Sub -- Ken Slovak [MVP - Outlook]http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm "Peter Marchert" wrote in message groups.com... Thank you Dmitry, but the error is still the Sub Test() Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As Long) Dim objContacts As Outlook.Items ... Erfahren Sie mehr »- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#34
|
|||
|
|||
![]()
Thanks a lot - email is sent to you.
Peter On 11 Nov., 08:04, "Dmitry Streblechenko" wrote: Ah! I see what the problem is. You can work around this by setting the RecurrencePattern.DayOfMonth property explicitly Or send me an e-mail if you want an updated version... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Dmitry Streblechenko" wrote in message ... Hmmm... I can reproduce this, let me play with this later tonight... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... Sorry, Dmitry, but I think you didn`t try the code :-( The reminder starts 5 days ago and the reminder comes up for the last night. In OOM the Recurrence Pattern is "every November 4" in RDO "every November 9 effective 11/4/2007" Peter On 9 Nov., 17:43, "Dmitry Streblechenko" wrote: AllDayEvent means it starts at midnight, so by default (unless you set it otherwise) the reminder time will be set to 15 minutes before the start. You can explicitly set the ReminderTime property if you want full control over the reminder. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... You can see what I mean, if you use the following code: Sub CreateAppointments() Dim objSession As Object Dim objAppointments As Object Dim objAppointment As Object Set objSession = CreateObject("Redemption.RDOSession") objSession.MAPIOBJECT = Outlook.Session.MAPIOBJECT Set objAppointment = objSession.GetDefaultFolder(olFolderCalendar).Item s.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = Date - 5 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = Date - 5 objRecPattern.NoEndDate = True .Save End With End Sub A reminder comes up from midnight of the last day. Redemption version is 4.5.0.730. Peter On 8 Nov., 21:35, "Dmitry Streblechenko" wrote: I am not sure what you mean by "but not appear when creating the items". Do you mean it shoudl nto appear while your codei is still running in a loop creating items? Why shouldn't Outlook display a reminder? I would imagine if you are using OOM, it physically cannot do so since it is busy with your script, but RDO does not use Outlook, so it is free to display a reminder. As for the recurrence description, what version of Redemption are you using? Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... The reminder should not be deactivated, but not appear when creating the items. With the code for OOM this is ok, with the same code in RDO the description of the appointments is different and the reminder for all created items appears. I think there is the problem. Why could this be if the code is the same? Peter On 8 Nov., 18:28, "Dmitry Streblechenko" wrote: Try to set RDOAppointmentItem.ReminderSet to false Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thank you Dmitry, this works fine. But I have another problem. In the code I create recurrence appointments: Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = dtmBirthday objRecPattern.NoEndDate = True With the OOM the description of the appointment is (translated) "This appointment occurs every year on the 25th October, starting on 25th October 2007" and no reminder comes up. Same code with RDO (objRecPattern then is dimed as object not longer as Outlook.RecurrencePattern) set the description to "This appointment occurs every year on the 25th October, in the period from 25.10.2007 to 02.01.4501." and a reminder comes up. So may be I have to set one more parameter in RDO? Peter On 7 Nov., 19:05, "Dmitry Streblechenko" wrote: I meant the RDO family of objects, which does not rely on OOM at all. You will need to change the variable declarations appropriately and use something like set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Outlook.Session.MAPIOBJECT 'make them both use the same session set objContacts = Session.GetDefaultFolder(olFolderContacts).Items set objAppointments =Session.GetDefaultFolder(olFolderCalendar).Items ... Next version of Redemption will keep track of the open MAPI objects and automatically release them when the number gets too high (they are transparently reopened on demand), so you won't have to go through the trouble of setting all objects to Nothing. Send me an e-mail if you want a beta. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... How to do that? This code occurs the same error: Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Dim objAppointments As Outlook.Items Dim objApp As Outlook.AppointmentItem Dim colLinks As Outlook.Links Dim objLink As Outlook.Link Dim objSafeApp As Object Set objAppointments = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items Set objSafeApp = CreateObject("SafeOutlook.SecureAppointment") Set objApp = objAppointments.Add objApp.Save objSafeApp.Item = objApp Set colLinks = objSafeApp.Links With objSafeApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing Set objContact = Nothing Set objSafeApp.Item = Nothing Set objSafeApp = Nothing End Sub Peter On 7 Nov., 07:11, "Dmitry Streblechenko" wrote: I can only suggest to use Redemption, which does not leave hanging references... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thanks for your idea, Ken. I`m sorry, but there is no change. Peter On 6 Nov., 21:47, "Ken Slovak - [MVP - Outlook]" wrote: Peter, see if this is any better: Public objContacts As Outlook.Items Public objContact As Outlook.ContactItem Public objAppointments As Outlook.Items Public objApp As Outlook.AppointmentItem Public colLinks As Outlook.Links Public objLink As Outlook.Link Sub Test() Dim oNS As Outlook.NameSpace Set oNS = Outlook.GetNameSpace("MAPI") Set objContacts = _ oNS.GetDefaultFolder(olFolderContacts).Items Set objAppointments = _ oNS.GetDefaultFolder(olFolderCalendar).Items Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) Set objContacts = Nothing Set objContact = Nothing Set objAppointments = Nothing Set objApp = Nothing Set colLinks = Nothing Set objLink = Nothing End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As ... Erfahren Sie mehr »- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#35
|
|||
|
|||
![]()
Peter,
I sent an updated version to you. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... Thanks a lot - email is sent to you. Peter On 11 Nov., 08:04, "Dmitry Streblechenko" wrote: Ah! I see what the problem is. You can work around this by setting the RecurrencePattern.DayOfMonth property explicitly Or send me an e-mail if you want an updated version... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Dmitry Streblechenko" wrote in message ... Hmmm... I can reproduce this, let me play with this later tonight... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... Sorry, Dmitry, but I think you didn`t try the code :-( The reminder starts 5 days ago and the reminder comes up for the last night. In OOM the Recurrence Pattern is "every November 4" in RDO "every November 9 effective 11/4/2007" Peter On 9 Nov., 17:43, "Dmitry Streblechenko" wrote: AllDayEvent means it starts at midnight, so by default (unless you set it otherwise) the reminder time will be set to 15 minutes before the start. You can explicitly set the ReminderTime property if you want full control over the reminder. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... You can see what I mean, if you use the following code: Sub CreateAppointments() Dim objSession As Object Dim objAppointments As Object Dim objAppointment As Object Set objSession = CreateObject("Redemption.RDOSession") objSession.MAPIOBJECT = Outlook.Session.MAPIOBJECT Set objAppointment = objSession.GetDefaultFolder(olFolderCalendar).Item s.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = Date - 5 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = Date - 5 objRecPattern.NoEndDate = True .Save End With End Sub A reminder comes up from midnight of the last day. Redemption version is 4.5.0.730. Peter On 8 Nov., 21:35, "Dmitry Streblechenko" wrote: I am not sure what you mean by "but not appear when creating the items". Do you mean it shoudl nto appear while your codei is still running in a loop creating items? Why shouldn't Outlook display a reminder? I would imagine if you are using OOM, it physically cannot do so since it is busy with your script, but RDO does not use Outlook, so it is free to display a reminder. As for the recurrence description, what version of Redemption are you using? Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... The reminder should not be deactivated, but not appear when creating the items. With the code for OOM this is ok, with the same code in RDO the description of the appointments is different and the reminder for all created items appears. I think there is the problem. Why could this be if the code is the same? Peter On 8 Nov., 18:28, "Dmitry Streblechenko" wrote: Try to set RDOAppointmentItem.ReminderSet to false Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thank you Dmitry, this works fine. But I have another problem. In the code I create recurrence appointments: Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = dtmBirthday objRecPattern.NoEndDate = True With the OOM the description of the appointment is (translated) "This appointment occurs every year on the 25th October, starting on 25th October 2007" and no reminder comes up. Same code with RDO (objRecPattern then is dimed as object not longer as Outlook.RecurrencePattern) set the description to "This appointment occurs every year on the 25th October, in the period from 25.10.2007 to 02.01.4501." and a reminder comes up. So may be I have to set one more parameter in RDO? Peter On 7 Nov., 19:05, "Dmitry Streblechenko" wrote: I meant the RDO family of objects, which does not rely on OOM at all. You will need to change the variable declarations appropriately and use something like set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Outlook.Session.MAPIOBJECT 'make them both use the same session set objContacts = Session.GetDefaultFolder(olFolderContacts).Items set objAppointments =Session.GetDefaultFolder(olFolderCalendar).Items ... Next version of Redemption will keep track of the open MAPI objects and automatically release them when the number gets too high (they are transparently reopened on demand), so you won't have to go through the trouble of setting all objects to Nothing. Send me an e-mail if you want a beta. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... How to do that? This code occurs the same error: Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Dim objAppointments As Outlook.Items Dim objApp As Outlook.AppointmentItem Dim colLinks As Outlook.Links Dim objLink As Outlook.Link Dim objSafeApp As Object Set objAppointments = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items Set objSafeApp = CreateObject("SafeOutlook.SecureAppointment") Set objApp = objAppointments.Add objApp.Save objSafeApp.Item = objApp Set colLinks = objSafeApp.Links With objSafeApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing Set objContact = Nothing Set objSafeApp.Item = Nothing Set objSafeApp = Nothing End Sub Peter On 7 Nov., 07:11, "Dmitry Streblechenko" wrote: I can only suggest to use Redemption, which does not leave hanging references... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thanks for your idea, Ken. I`m sorry, but there is no change. Peter On 6 Nov., 21:47, "Ken Slovak - [MVP - Outlook]" wrote: Peter, see if this is any better: Public objContacts As Outlook.Items Public objContact As Outlook.ContactItem Public objAppointments As Outlook.Items Public objApp As Outlook.AppointmentItem Public colLinks As Outlook.Links Public objLink As Outlook.Link Sub Test() Dim oNS As Outlook.NameSpace Set oNS = Outlook.GetNameSpace("MAPI") Set objContacts = _ oNS.GetDefaultFolder(olFolderContacts).Items Set objAppointments = _ oNS.GetDefaultFolder(olFolderCalendar).Items Call CreateAppointments(1, 230) Call CreateAppointments(231, 400) Set objContacts = Nothing Set objContact = Nothing Set objAppointments = Nothing Set objApp = Nothing Set colLinks = Nothing Set objLink = Nothing End Sub Sub CreateAppointments(ByVal lngFrom As Long, ByVal lngTo As ... Erfahren Sie mehr »- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#36
|
|||
|
|||
![]()
Thanks! With the new version it works.
Peter On 11 Nov., 23:13, "Dmitry Streblechenko" wrote: Peter, I sent an updated version to you. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... Thanks a lot - email is sent to you. Peter On 11 Nov., 08:04, "Dmitry Streblechenko" wrote: Ah! I see what the problem is. You can work around this by setting the RecurrencePattern.DayOfMonth property explicitly Or send me an e-mail if you want an updated version... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Dmitry Streblechenko" wrote in message ... Hmmm... I can reproduce this, let me play with this later tonight... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message ups.com... Sorry, Dmitry, but I think you didn`t try the code :-( The reminder starts 5 days ago and the reminder comes up for the last night. In OOM the Recurrence Pattern is "every November 4" in RDO "every November 9 effective 11/4/2007" Peter On 9 Nov., 17:43, "Dmitry Streblechenko" wrote: AllDayEvent means it starts at midnight, so by default (unless you set it otherwise) the reminder time will be set to 15 minutes before the start. You can explicitly set the ReminderTime property if you want full control over the reminder. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... You can see what I mean, if you use the following code: Sub CreateAppointments() Dim objSession As Object Dim objAppointments As Object Dim objAppointment As Object Set objSession = CreateObject("Redemption.RDOSession") objSession.MAPIOBJECT = Outlook.Session.MAPIOBJECT Set objAppointment = objSession.GetDefaultFolder(olFolderCalendar).Item s.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = Date - 5 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = Date - 5 objRecPattern.NoEndDate = True .Save End With End Sub A reminder comes up from midnight of the last day. Redemption version is 4.5.0.730. Peter On 8 Nov., 21:35, "Dmitry Streblechenko" wrote: I am not sure what you mean by "but not appear when creating the items". Do you mean it shoudl nto appear while your codei is still running in a loop creating items? Why shouldn't Outlook display a reminder? I would imagine if you are using OOM, it physically cannot do so since it is busy with your script, but RDO does not use Outlook, so it is free to display a reminder. As for the recurrence description, what version of Redemption are you using? Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... The reminder should not be deactivated, but not appear when creating the items. With the code for OOM this is ok, with the same code in RDO the description of the appointments is different and the reminder for all created items appears. I think there is the problem. Why could this be if the code is the same? Peter On 8 Nov., 18:28, "Dmitry Streblechenko" wrote: Try to set RDOAppointmentItem.ReminderSet to false Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thank you Dmitry, this works fine. But I have another problem. In the code I create recurrence appointments: Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = dtmBirthday objRecPattern.NoEndDate = True With the OOM the description of the appointment is (translated) "This appointment occurs every year on the 25th October, starting on 25th October 2007" and no reminder comes up. Same code with RDO (objRecPattern then is dimed as object not longer as Outlook.RecurrencePattern) set the description to "This appointment occurs every year on the 25th October, in the period from 25.10.2007 to 02.01.4501." and a reminder comes up. So may be I have to set one more parameter in RDO? Peter On 7 Nov., 19:05, "Dmitry Streblechenko" wrote: I meant the RDO family of objects, which does not rely on OOM at all. You will need to change the variable declarations appropriately and use something like set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Outlook.Session.MAPIOBJECT 'make them both use the same session set objContacts = Session.GetDefaultFolder(olFolderContacts).Items set objAppointments =Session.GetDefaultFolder(olFolderCalendar).Items ... Next version of Redemption will keep track of the open MAPI objects and automatically release them when the number gets too high (they are transparently reopened on demand), so you won't have to go through the trouble of setting all objects to Nothing. Send me an e-mail if you want a beta. Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... How to do that? This code occurs the same error: Sub AddAppointment(ByVal objContact As Outlook.ContactItem) Dim objAppointments As Outlook.Items Dim objApp As Outlook.AppointmentItem Dim colLinks As Outlook.Links Dim objLink As Outlook.Link Dim objSafeApp As Object Set objAppointments = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items Set objSafeApp = CreateObject("SafeOutlook.SecureAppointment") Set objApp = objAppointments.Add objApp.Save objSafeApp.Item = objApp Set colLinks = objSafeApp.Links With objSafeApp .ReminderSet = False .Subject = objContact.Subject Set objLink = colLinks.Add(objContact) .Save End With Set objLink = Nothing Set colLinks = Nothing Set objApp = Nothing Set objContact = Nothing Set objSafeApp.Item = Nothing Set objSafeApp = Nothing End Sub Peter On 7 Nov., 07:11, "Dmitry Streblechenko" wrote: I can only suggest to use Redemption, which does not leave hanging references... Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Peter Marchert" wrote in message roups.com... Thanks for your idea, Ken. I`m sorry, but there is no change. Peter On 6 Nov., 21:47, "Ken Slovak - [MVP - Outlook]" wrote: Peter, see if this is any better: Public objContacts As Outlook.Items Public objContact As Outlook.ContactItem Public objAppointments As Outlook.Items Public objApp As Outlook.AppointmentItem Public colLinks As Outlook.Links Public objLink As Outlook.Link Sub Test() Dim oNS As ... Erfahren Sie mehr - Zitierten Text ausblenden - - Zitierten Text anzeigen - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2007/Exchange 2003 error when creating multiple items | Tadwick | Outlook and VBA | 7 | February 23rd 07 06:33 PM |
Creating Mailbox Top Level Folder with VBA | Boy from Oz | Outlook and VBA | 2 | November 24th 06 07:05 AM |
Permission error when creating rule in your own mailbox? | MC | Outlook - Installation | 6 | June 28th 06 03:02 PM |
Creating a Calendar in Exchange 5.5 Public Folders...Rights error. | Chris Stephens | Outlook - Calandaring | 1 | May 4th 06 02:32 PM |
Exchange Mailbox server prohibit from sending when reach mailbox size limit | Milly Staples [MVP - Outlook] | Outlook - General Queries | 1 | February 24th 06 06:41 PM |