A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Birthdays in calendar



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 23rd 06, 07:15 PM posted to microsoft.public.outlook.program_vba
Twotone
external usenet poster
 
Posts: 7
Default Birthdays in calendar

I have a macro that I run periodically on a particular contacts folder to
change all the Last Names of the contacts in that folder to uppercase. The
code, shown below, seems to work fine, except that, every time I run it, it
creates an extra shortcut in my calendar for each of the contacts' birthdays.
I now have four shortcuts for each of about 200 contacts' birthdays.

Can anyone suggest
(a) How to modify my code to stop this happening in future
(b) A new macro to remove the redundant shortcuts in my calendar.

I am using Outlook 2003 (fully updated) on Windows XP Professional (fully
updated)

TIA Anthony

Sub PutLastNameInCaps()
'For phone contacts folder so they are easier to read on my phone

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders("Phone contacts")

For Each mycontact In myNewFolder.Items
MyNewName = UCase(mycontact.LastName)
mycontact.LastName = MyNewName
mycontact.Save
Next mycontact

End Sub
  #2  
Old December 24th 06, 06:12 AM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default Birthdays in calendar

This "feature" is only supported in Outlook Version 2003.

You can try to use the following code to remove the birthday entry:

Public Sub RemoveBirthDay(ByVal strBirthDay As String, ByVal strName As
String)

Dim objCalendar As Outlook.AppointmentItem
Dim strFind As String

strFind = "[Subject] = " & strName & Asc(39) & "s " &
"""Birthday"""""
Set objCalendar =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items.Find(strFind)

If Not objCalendar Is Nothing Then
If objCalendar.Start = strBirthDay Then objCalendar.Delete
End If

End Sub

If you have anniversaries in your contact you need to delete these too.

Best Regards
Peter

--
Peter Marchert
[EDP-Service Marchert]
Homepage: Http://Www.Marchert.De
Excel- And Outlook Programming


On 23 Dez., 19:15, Twotone wrote:
I have a macro that I run periodically on a particular contacts folder to
change all the Last Names of the contacts in that folder to uppercase. The
code, shown below, seems to work fine, except that, every time I run it, it
creates an extra shortcut in my calendar for each of the contacts' birthdays.
I now have four shortcuts for each of about 200 contacts' birthdays.

Can anyone suggest
(a) How to modify my code to stop this happening in future
(b) A new macro to remove the redundant shortcuts in my calendar.

I am using Outlook 2003 (fully updated) on Windows XP Professional (fully
updated)

TIA Anthony

Sub PutLastNameInCaps()
'For phone contacts folder so they are easier to read on my phone

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders("Phone contacts")

For Each mycontact In myNewFolder.Items
MyNewName = UCase(mycontact.LastName)
mycontact.LastName = MyNewName
mycontact.Save
Next mycontact

End Sub


  #3  
Old January 8th 07, 01:41 PM posted to microsoft.public.outlook.program_vba
Twotone
external usenet poster
 
Posts: 7
Default Birthdays in calendar

Thanks, Peter. Sorry for delay in saying so.

Happy new year, Anthony

"Peter Marchert" wrote:

This "feature" is only supported in Outlook Version 2003.

You can try to use the following code to remove the birthday entry:

Public Sub RemoveBirthDay(ByVal strBirthDay As String, ByVal strName As
String)

Dim objCalendar As Outlook.AppointmentItem
Dim strFind As String

strFind = "[Subject] = " & strName & Asc(39) & "s " &
"""Birthday"""""
Set objCalendar =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items.Find(strFind)

If Not objCalendar Is Nothing Then
If objCalendar.Start = strBirthDay Then objCalendar.Delete
End If

End Sub

If you have anniversaries in your contact you need to delete these too.

Best Regards
Peter

--
Peter Marchert
[EDP-Service Marchert]
Homepage: Http://Www.Marchert.De
Excel- And Outlook Programming


On 23 Dez., 19:15, Twotone wrote:
I have a macro that I run periodically on a particular contacts folder to
change all the Last Names of the contacts in that folder to uppercase. The
code, shown below, seems to work fine, except that, every time I run it, it
creates an extra shortcut in my calendar for each of the contacts' birthdays.
I now have four shortcuts for each of about 200 contacts' birthdays.

Can anyone suggest
(a) How to modify my code to stop this happening in future
(b) A new macro to remove the redundant shortcuts in my calendar.

I am using Outlook 2003 (fully updated) on Windows XP Professional (fully
updated)

TIA Anthony

Sub PutLastNameInCaps()
'For phone contacts folder so they are easier to read on my phone

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders("Phone contacts")

For Each mycontact In myNewFolder.Items
MyNewName = UCase(mycontact.LastName)
mycontact.LastName = MyNewName
mycontact.Save
Next mycontact

End Sub



  #4  
Old January 8th 07, 02:27 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default Birthdays in calendar

It doesn`t matter - lot of people never reply, thanks.

Peter

On 8 Jan., 13:41, Twotone wrote:
Thanks, Peter. Sorry for delay in saying so.

Happy new year, Anthony



"Peter Marchert" wrote:
This "feature" is only supported in Outlook Version 2003.


You can try to use the following code to remove the birthday entry:


Public Sub RemoveBirthDay(ByVal strBirthDay As String, ByVal strName As
String)


Dim objCalendar As Outlook.AppointmentItem
Dim strFind As String


strFind = "[Subject] = " & strName & Asc(39) & "s " &
"""Birthday"""""
Set objCalendar =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items.Find(strFind)


If Not objCalendar Is Nothing Then
If objCalendar.Start = strBirthDay Then objCalendar.Delete
End If


End Sub


If you have anniversaries in your contact you need to delete these too.


Best Regards
Peter


--
Peter Marchert
[EDP-Service Marchert]
Homepage: Http://Www.Marchert.De
Excel- And Outlook Programming


On 23 Dez., 19:15, Twotone wrote:
I have a macro that I run periodically on a particular contacts folder to
change all the Last Names of the contacts in that folder to uppercase. The
code, shown below, seems to work fine, except that, every time I run it, it
creates an extra shortcut in my calendar for each of the contacts' birthdays.
I now have four shortcuts for each of about 200 contacts' birthdays.


Can anyone suggest
(a) How to modify my code to stop this happening in future
(b) A new macro to remove the redundant shortcuts in my calendar.


I am using Outlook 2003 (fully updated) on Windows XP Professional (fully
updated)


TIA Anthony


Sub PutLastNameInCaps()
'For phone contacts folder so they are easier to read on my phone


Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders("Phone contacts")


For Each mycontact In myNewFolder.Items
MyNewName = UCase(mycontact.LastName)
mycontact.LastName = MyNewName
mycontact.Save
Next mycontact


End Sub- Zitierten Text ausblenden -- Zitierten Text anzeigen -


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
birthdays not showing in calendar after importing contacts from ex Dindo Fernando Outlook - Using Contacts 15 May 8th 06 12:16 PM
Birthdays are not showing up in my calendar Oren Outlook - Calandaring 1 May 6th 06 09:07 PM
Group Calendar(Birthdays) gary Outlook - Calandaring 3 April 4th 06 08:31 AM
birthdays on calendar Dell Outlook - Calandaring 1 January 22nd 06 08:22 AM
Names Missing from Birthdays in Calendar [email protected] Outlook - Calandaring 0 January 9th 06 10:07 PM


All times are GMT +1. The time now is 07:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.