![]() |
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,
When you add a contact with a birthday, a calendar item will be automatically added. This doesn't work for imported contacts. And I don't want to manually re-enter the birthday for the tens of contacts with birthday. Apparently (after some googling) this functionality doesn't exist in Outlook 2002, and it should be done with a macro. I found the following macro on a German site (see other post in this discussion group), but I am not very confident that it will not screw up all my contacts (the "mybirthday" and the "12.12.2000" make it seem to me that it might replace all my carefully collected birthdays with the birthday of this joker? But maybe I'm just too paranoiac and this works just fine). I don't know anything from macro's, so can someone have a look and check this macro? Thanks a lot. Peter -------------------------------------------------------------------------------- Sub BirthdayImport() Dim myFolder As MAPIFolder Set myFolder = Session.PickFolder For i = myFolder.Items.Count To 1 Step -1 If myFolder.Items(i).Class = 40 Then myFolder.Items(i).Display mybirthday = myFolder.Items(i).Birthday myFolder.Items(i).Birthday = "12.12.2000 " myFolder.Items(i).Birthday = mybirthday myFolder.Items(i).Save myFolder.Items(i).Close 0 End If Next i End Sub -------------------------------------------------------------------------------- |
Ads |
#2
|
|||
|
|||
![]() Ok, I try to get some learning out of this as well. I understand most of the code now, so I understand that the 12.12.2000 is just a temporary birthday date before being changed with the original one again. The only line of code that I can't figure out is this one: If myFolder.Items(i).Class = 40 What is the meaning of this 40 ? Peter "Peter K." wrote: Hello, When you add a contact with a birthday, a calendar item will be automatically added. This doesn't work for imported contacts. And I don't want to manually re-enter the birthday for the tens of contacts with birthday. Apparently (after some googling) this functionality doesn't exist in Outlook 2002, and it should be done with a macro. I found the following macro on a German site (see other post in this discussion group), but I am not very confident that it will not screw up all my contacts (the "mybirthday" and the "12.12.2000" make it seem to me that it might replace all my carefully collected birthdays with the birthday of this joker? But maybe I'm just too paranoiac and this works just fine). I don't know anything from macro's, so can someone have a look and check this macro? Thanks a lot. Peter -------------------------------------------------------------------------------- Sub BirthdayImport() Dim myFolder As MAPIFolder Set myFolder = Session.PickFolder For i = myFolder.Items.Count To 1 Step -1 If myFolder.Items(i).Class = 40 Then myFolder.Items(i).Display mybirthday = myFolder.Items(i).Birthday myFolder.Items(i).Birthday = "12.12.2000 " myFolder.Items(i).Birthday = mybirthday myFolder.Items(i).Save myFolder.Items(i).Close 0 End If Next i End Sub -------------------------------------------------------------------------------- |
#3
|
|||
|
|||
![]()
The Object Browser is your friend.
Class uses the OlObjectClass enum. 40 = olContact. So the code is testing to see if the item is a contact item. -- 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 "Peter K." wrote in message ... Ok, I try to get some learning out of this as well. I understand most of the code now, so I understand that the 12.12.2000 is just a temporary birthday date before being changed with the original one again. The only line of code that I can't figure out is this one: If myFolder.Items(i).Class = 40 What is the meaning of this 40 ? Peter "Peter K." wrote: Hello, When you add a contact with a birthday, a calendar item will be automatically added. This doesn't work for imported contacts. And I don't want to manually re-enter the birthday for the tens of contacts with birthday. Apparently (after some googling) this functionality doesn't exist in Outlook 2002, and it should be done with a macro. I found the following macro on a German site (see other post in this discussion group), but I am not very confident that it will not screw up all my contacts (the "mybirthday" and the "12.12.2000" make it seem to me that it might replace all my carefully collected birthdays with the birthday of this joker? But maybe I'm just too paranoiac and this works just fine). I don't know anything from macro's, so can someone have a look and check this macro? Thanks a lot. Peter -------------------------------------------------------------------------------- Sub BirthdayImport() Dim myFolder As MAPIFolder Set myFolder = Session.PickFolder For i = myFolder.Items.Count To 1 Step -1 If myFolder.Items(i).Class = 40 Then myFolder.Items(i).Display mybirthday = myFolder.Items(i).Birthday myFolder.Items(i).Birthday = "12.12.2000 " myFolder.Items(i).Birthday = mybirthday myFolder.Items(i).Save myFolder.Items(i).Close 0 End If Next i End Sub -------------------------------------------------------------------------------- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Deleting calendar items should ask "all past and future items" | katie | Outlook - Calandaring | 0 | April 4th 06 03:52 AM |
"Percent" field changed to "Number" field | Vaughan | Outlook - Using Forms | 1 | March 14th 06 01:32 PM |
Shared Calendar items "automatically" added to personal Calendar? | [email protected] | Outlook - Calandaring | 1 | February 6th 06 06:01 PM |
Where is "Categories" field in create new task window? How do I add it? | [email protected] | Outlook - Calandaring | 1 | February 1st 06 07:21 PM |
macro for "from" field | Roann | Outlook and VBA | 1 | January 30th 06 06:41 AM |