Birthdays recreation in Outlook x64

  • Thread starter Thread starter Toma
  • Start date Start date
T

Toma

Hi!
After I have migrated to Office 365, I lost all Birthdays and Anniversaries in calendar in my Outlook 2010 64 bit. I tried macro suggested at Slipstick
http://www.slipstick.com/outlook/contacts/adding-birthdays-and-anniversaries-to-outlooks-calendar/
Unfortunately without success.
Looks to me like VBA macro does not really change dates. So I added toggle breakpoints and watched variables with condition when changed. I noticed that this two lines do not change values of assigned variables:
myFolder.Items(i).Birthday = Now
myFolder.Items(i).Anniversary = Now.
I thought, may be date code should be formatted with FormatDateTime() to change values. So, I tried also with formatted date, added lines:
Dim datum As Date
....
datum = Now
datum = FormatDateTime(datum, vbShortDate)
myFolder.Items(i).Birthday = datum
myFolder.Items(i).Anniversary = datum
....

Unfortunately, still no change noticed in this lines by debugger neither for myFolder.Items(i).Birthday nor for Anniversary.

And I also ordered the application Rebuild Birthdays and Anniversaries as suggested on Slipstick paage. But it failed to install. Support team replied to me that they will issue me a refund as they don't support 64-bit for another month or so.

Thanks for any suggestion to get macro code running or I will have to do it manually...

Toma
 
Hi!

After I have migrated to Office 365, I lost all Birthdays and Anniversaries in calendar in my Outlook 2010 64 bit. I tried macro suggested at Slipstick

http://www.slipstick.com/outlook/contacts/adding-birthdays-and-anniversaries-to-outlooks-calendar/

Unfortunately without success.

Looks to me like VBA macro does not really change dates. So I added toggle breakpoints and watched variables with condition when changed. I noticed that this two lines do not change values of assigned variables:

myFolder.Items(i).Birthday = Now

myFolder.Items(i).Anniversary = Now.

I thought, may be date code should be formatted with FormatDateTime() to change values. So, I tried also with formatted date, added lines:

Dim datum As Date

...

datum = Now

datum = FormatDateTime(datum, vbShortDate)

myFolder.Items(i).Birthday = datum

myFolder.Items(i).Anniversary = datum

...



Unfortunately, still no change noticed in this lines by debugger neither for myFolder.Items(i).Birthday nor for Anniversary.



And I also ordered the application Rebuild Birthdays and Anniversaries assuggested on Slipstick paage. But it failed to install. Support team replied to me that they will issue me a refund as they don't support 64-bit for another month or so.



Thanks for any suggestion to get macro code running or I will have to do it manually...



Toma

Hi Tom. These old USENET forums are no longer used. In the future, please post Outlook development questions here:

Outlook for Developers Forum
http://social.msdn.microsoft.com/Forums/en-US/outlookdev/threads

Some things to verify: Is the date in the datum variable actually differentthan what you read in the Birthday and Anniversary properties? Are you calling the .Save method? Are you certain the myFolder.Items(i) item is a real Contact item and not maybe a Distribution list? Can you step through each Contact one by one and read myFolder.Items(i).FullName and compare with real Contact values? Can you try using full Contact variables?
 
Hi Tom. These old USENET forums are no longer used. In the future, please post Outlook development questions here:
Outlook for Developers Forum

Thanks, Eric!
I am so used to use Usenet :-)
But I will do what is necessary to resolve birthdays.
Some things to verify: Is the date in the datum variable actually different than what you read in the Birthday and Anniversary properties?

Yes, it is.
Just tested it again and watched variables when changed:
Change: : myFolder.Items(i).Birthday : 25.5.1960. : Variant/Date : Module1.AddBirthdaysAnniversaries
Watch : : datum : 2.4.2013. : Date : Module1.AddBirthdaysAnniversaries
Are you calling the .Save method?

Yes, in same two lines as in original Slipstick macro:
myFolder.Items(i).Save
myFolder.Items(i).Close 0
But, looks like it have no effects?

Are you certain the myFolder.Items(i) item is a real Contact item and not maybe a Distribution list?

Yes, I am. Correct variable is shown in Watches:
Watch : + : myFolder.Items(i) : "****, ****" : Variant/Object/ContactItem : Module1.AddBirthdaysAnniversaries
Can you step through each Contact one by one and read myFolder.Items(i).FullName and compare with real Contact values?

Yes. Names look OK when compared with real values.
Can you try using full Contact variables?

I am not sure what did you mean by using full Contact variables. Would you be so kind and explain it little bit more with VBA code?
 
It definitely sounds like everything is fine - except that Outlook isn't committing the changes on Save. That's absolutely bizarre and I have no explanation for it!

By using full Contact variables I mean doing this:

Dim objContact As ContactItem

Set objContact = myFolder.Items(i)
objContact.Birthday = blah blah blah

It's unlikely this will fix the problem, but it's definitely cleaner for error handling and debugging (especially to verify that you are indeed getting access to a Contact, and that the ones you expect to be updated ARE being updated).
 
Back
Top