![]() |
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 |
#1
|
|||
|
|||
![]()
Hello,
I`m trying to create birthday appointments the same way like Outlook does if you add a birthday in a contact. With this code I´m not able to do so: Sub CreateBirthday() Dim objAppointment As Outlook.AppointmentItem Dim objRecPattern As Outlook.RecurrencePattern Set objAppointment = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = CLng(27820) ' 3/1/1976 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = CLng(27820) objRecPattern.NoEndDate = True .Save End With Set objRecPattern = Nothing Set objAppointment = Nothing End Sub I expected a recurrence like: End after: End by: None but I get a recurrence like this: End after: 10 End by: Fri 3/1/1985 Is the used code wrong or does a workarround exists to get the same result like Outlook? I ask this question because my program creates birthday in that way and a user have problems with the appointments after synchronizing with his handy. May be it has to do with the way I create the items? Btw: Setting the occurrences takes no effect (objRecPattern.Occurrences = 1), it is still 10. Thanks Peter -- Infos, workshops & software for Outlook(R): www.outlook-stuff.com |
Ads |
#2
|
|||
|
|||
![]()
Your code works prefectly fine on Outlook 2007 - weird.
-- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Peter Marchert" wrote: Hello, I`m trying to create birthday appointments the same way like Outlook does if you add a birthday in a contact. With this code I´m not able to do so: Sub CreateBirthday() Dim objAppointment As Outlook.AppointmentItem Dim objRecPattern As Outlook.RecurrencePattern Set objAppointment = Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items.Add With objAppointment .ReminderSet = True .Subject = "Test" .AllDayEvent = True .Start = CLng(27820) ' 3/1/1976 Set objRecPattern = .GetRecurrencePattern objRecPattern.RecurrenceType = olRecursYearly objRecPattern.PatternStartDate = CLng(27820) objRecPattern.NoEndDate = True .Save End With Set objRecPattern = Nothing Set objAppointment = Nothing End Sub I expected a recurrence like: End after: End by: None but I get a recurrence like this: End after: 10 End by: Fri 3/1/1985 Is the used code wrong or does a workarround exists to get the same result like Outlook? I ask this question because my program creates birthday in that way and a user have problems with the appointments after synchronizing with his handy. May be it has to do with the way I create the items? Btw: Setting the occurrences takes no effect (objRecPattern.Occurrences = 1), it is still 10. Thanks Peter -- Infos, workshops & software for Outlook(R): www.outlook-stuff.com |
#3
|
|||
|
|||
![]()
On 7 Dez., 21:54, Eric Legault [MVP - Outlook]
wrote: Your code works prefectly fine on Outlook 2007 - weird. Please have a closer look to the created appointment, especially to the appointments recurrence and the posted properties. Peter -- Infos, workshops & software for Outlook(R): www.outlook-stuff.com |
#4
|
|||
|
|||
![]()
Peter,
Comment out this line and try it again: objRecPattern.NoEndDate = True -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message ... On 7 Dez., 21:54, Eric Legault [MVP - Outlook] wrote: Your code works prefectly fine on Outlook 2007 - weird. Please have a closer look to the created appointment, especially to the appointments recurrence and the posted properties. Peter -- Infos, workshops & software for Outlook(R): www.outlook-stuff.com |
#5
|
|||
|
|||
![]()
Thanks, Ken.
I tried it but it`s the same result. I tested it with 2003 (English) and SP3. Peter On 8 Dez., 19:05, "Ken Slovak - [MVP - Outlook]" wrote: Peter, Comment out this line and try it again: objRecPattern.NoEndDate = True -- 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 ... On 7 Dez., 21:54, Eric Legault [MVP - Outlook] wrote: Your code works prefectly fine on Outlook 2007 - weird. Please have a closer look to the created appointment, especially to the appointments recurrence and the posted properties. Peter -- Infos, workshops & software for Outlook(R):www.outlook-stuff.com- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#6
|
|||
|
|||
![]()
That's odd. I tested it here with that same exact setup and got a recurring
item with no end (infinite series). Did you delete any existing instances of that item before testing with that line commented out? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message ... Thanks, Ken. I tried it but it`s the same result. I tested it with 2003 (English) and SP3. Peter |
#7
|
|||
|
|||
![]()
I resetted my virtual machine now and tried it again: same result.
You got the following properties?: 1. No end date: checked 2. End after: unchecked 3. occurrences: 4. End by: unchecked 5. End by date: None I got this properties: 1. No end date: checked 2. End after: unchecked 3. occurrences: 10 4. End by: unchecked 5. End by date: Fri 3/1/1985 Thanks Peter On 10 Dez., 15:22, "Ken Slovak - [MVP - Outlook]" wrote: That's odd. I tested it here with that same exact setup and got a recurring item with no end (infinite series). Did you delete any existing instances of that item before testing with that line commented out? -- 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 ... Thanks, Ken. I tried it but it`s the same result. I tested it with 2003 (English) and SP3. Peter- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#8
|
|||
|
|||
![]()
The recurrence pattern I got was:
No end date: selected // these are radio controls not checkboxes End after: unselected End by: unselected Yearly recurrence pattern, Start 12:00 AM, End 12:00 AM, duration 1 day, every March 1. Start Monday March 1, 1976. It really doesn't matter if the unselected radio controls for End after and End by have values in them as long as they are not selected. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message ... I resetted my virtual machine now and tried it again: same result. You got the following properties?: 1. No end date: checked 2. End after: unchecked 3. occurrences: 4. End by: unchecked 5. End by date: None I got this properties: 1. No end date: checked 2. End after: unchecked 3. occurrences: 10 4. End by: unchecked 5. End by date: Fri 3/1/1985 Thanks Peter |
#9
|
|||
|
|||
![]()
these are radio controls not checkboxes
I`m sorry, Ken. It really doesn't matter if the unselected radio controls for End after and End by have values in them as long as they are not selected. I hope so. For me there is no logical reason why the appointments are created in this way - therefore I asked. Thank you Peter On 10 Dez., 19:54, "Ken Slovak - [MVP - Outlook]" wrote: The recurrence pattern I got was: No end date: selected // these are radio controls not checkboxes End after: unselected End by: unselected Yearly recurrence pattern, Start 12:00 AM, End 12:00 AM, duration 1 day, every March 1. Start Monday March 1, 1976. It really doesn't matter if the unselected radio controls for End after and End by have values in them as long as they are not selected. -- 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 ... I resetted my virtual machine now and tried it again: same result. You got the following properties?: 1. No end date: checked 2. End after: unchecked 3. occurrences: 4. End by: unchecked 5. End by date: None I got this properties: 1. No end date: checked 2. End after: unchecked 3. occurrences: 10 4. End by: unchecked 5. End by date: Fri 3/1/1985 Thanks Peter- Zitierten Text ausblenden - - Zitierten Text anzeigen - |
#10
|
|||
|
|||
![]()
Post back if you have any problems with those recurring items with that code
line commented out, and we'll try to figure out what's going on. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message ... these are radio controls not checkboxes I`m sorry, Ken. It really doesn't matter if the unselected radio controls for End after and End by have values in them as long as they are not selected. I hope so. For me there is no logical reason why the appointments are created in this way - therefore I asked. Thank you Peter |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
EXPORT BIRTHDAYS INTO OUTLOOK | PUZZLED IN ORLANDO | Outlook - Using Contacts | 3 | November 8th 07 03:52 AM |
Outlook birthdays | Danie Eksteen | Outlook - Using Contacts | 2 | June 13th 07 02:55 PM |
How do I sort my birthdays by month I have 500 of them? Outlook | Thomas | Outlook - Using Contacts | 2 | October 31st 06 01:47 AM |
why does Outlook assign times to birthdays | mbryce52 | Outlook - Calandaring | 1 | February 20th 06 03:04 PM |
How do I automatically create Venutian & Mars Birthdays from contact form | BJ | Outlook - Using Forms | 0 | January 13th 06 03:05 AM |