Ana içeriğe atla

Doğum günleri Excel'den Outlook takvimine nasıl aktarılır?

Bir çalışma sayfasında uzun bir doğum günü bilgisi listeniz varsa, şimdi bu doğum günlerini Outlook takviminize etkinlik olarak almak istiyorsunuz. Bu görevle bazı hızlı yöntemlerle nasıl başa çıkabilirsiniz?


VBA koduyla doğum günlerini Excel'den Outlook takvimine aktarın

Normalde doğum günlerini Outlook takvimine aktarmanın doğrudan bir yolu yoktur, burada bu sorunu çözmek için bir VBA kodu oluşturacağım, lütfen aşağıdaki adımları uygulayın:

1. Outlook'a aktarmak istediğiniz doğum günlerini içeren çalışma sayfasını açın ve ardından ALT + F11 tuşlarını açmak için Uygulamalar için Microsoft Visual Basic pencere.

2. tıklayın Ekle > modülve aşağıdaki kodu Modül Penceresine yapıştırın.

VBA kodu: Doğum günlerini Outlook takvimine aktarın

Sub ImportBirthdaysToCalendar()
'Updateby ExtendOffice
Dim xWs As Excel.Worksheet
Dim xRng As Range
Dim xOlApp As Outlook.Application
Dim xCalendarFld As Outlook.Folder
Dim xAppointmentItem As Outlook.AppointmentItem
Dim xRecurrencePattern As Outlook.RecurrencePattern
Dim xRow As Integer
On Error Resume Next
Set xWs = ThisWorkbook.ActiveSheet
Set xRng = Application.InputBox("Please select the data range (only two columns):", "Kutools for Excel", , , , , , 8)
If xRng Is Nothing Then Exit Sub
If xRng.Columns.Count <> 2 Then
  MsgBox "You can only select two columns", vbOKOnly + vbCritical, "Kutools for Excel"
  Exit Sub
End If
Set xOlApp = CreateObject("Outlook.Application")
Set xCalendarFld = xOlApp.Session.GetDefaultFolder(olFolderCalendar)
For xRow = 1 To xRng.Rows.Count
  Set xAppointmentItem = xCalendarFld.Items.Add("IPM.Appointment")
  With xAppointmentItem
    .Subject = xRng.Cells(xRow, 1) & Chr(39) & "s Birthday"
    .AllDayEvent = True
    .Start = xRng.Cells(xRow, 2)
    Set xRecurrencePattern = .GetRecurrencePattern
    xRecurrencePattern.RecurrenceType = olRecursYearly
    .Save
  End With
Next
Set xWs = Nothing
Set xCalendarFld = Nothing
Set xOlApp = Nothing
End Sub

3. Hala içinde Uygulamalar için Microsoft Visual Basic Pencere, tıklayın Tools > Referanslar. dışarı fırladı Referanslar - VBAProject iletişim kutusu, işaretleyin Microsoft Outlook 16.0 Nesne Kitaplığı seçenek formu Mevcut Referanslar liste kutusu, ekran görüntüsüne bakın:

4. Sonra tıklayın OK Bu iletişim kutusunu kapatmak için Şimdi basın F5 bu kodu çalıştırmak için anahtar ve bir bilgi istemi kutusu açılır, lütfen adı ve doğum günü sütunlarını seçin, ekran görüntüsüne bakın:

5. Ve sonra tıklayın OK düğmesini tıkladığınızda, doğum günleri bir kerede Outlook takvimine aktarılacaktır, sonucu görüntülemek için Outlook'unuzu başlatabilirsiniz, ekran görüntüsüne bakın:


En İyi Ofis Üretkenlik Araçları

Outlook için Kutools - Outlook'unuzu Güçlendirecek 100'den Fazla Güçlü Özellik

🤖 AI Posta Yardımcısı: Yapay zeka büyüsüyle anında profesyonel e-postalar: tek tıkla dahice yanıtlar, mükemmel ton, çok dilli ustalık. E-posta göndermeyi zahmetsizce dönüştürün! ...

???? E-posta Otomasyonu: Ofis Dışında (POP ve IMAP için kullanılabilir)  /  E-posta Gönderimini Planla  /  E-posta Gönderirken Kurallara Göre Otomatik CC/BCC  /  Otomatik İletme (Gelişmiş Kurallar)   /  Otomatik Karşılama Ekleme   /  Çok Alıcılı E-postaları Otomatik Olarak Bireysel Mesajlara Bölün ...

📨 E-posta Yönetimi: E-postaları Kolayca Geri Çağırın  /  Dolandırıcılık E-postalarını Konulara ve Diğerlerine Göre Engelleyin  /  Yinelenen E-postaları Silin  /  gelişmiş Arama  /  Klasörleri Birleştir ...

📁 Ekler ProToplu Kaydetme  /  Toplu Ayır  /  Toplu Sıkıştırma  /  Otomatik kaydet   /  Otomatik Ayır  /  Otomatik Sıkıştır ...

🌟 Arayüz Büyüsü: 😊Daha Fazla Güzel ve Havalı Emoji   /  Sekmeli Görünümlerle Outlook Verimliliğinizi Artırın  /  Outlook'u Kapatmak Yerine Küçültün ...

👍 Tek Tıklamayla Harikalar: Tümünü Gelen Eklerle Yanıtla  /   Kimlik Avına Karşı E-postalar  /  🕘Gönderenin Saat Dilimini Göster ...

👩🏼‍🤝‍👩🏻 Kişiler ve Takvim: Seçilen E-postalardan Toplu Kişi Ekleme  /  Kişi Grubunu Bireysel Gruplara Bölme  /  Doğum Günü Hatırlatıcılarını Kaldır ...

üzerinde 100 Özellikler Keşfinizi Bekleyin! Daha Fazlasını Keşfetmek İçin Buraya Tıklayın.

 

 

Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi Skyyang,

I'm trying to use the code to import the birthdays into a Sharepoint Events List, which is located in my outlook as calendar, but when i run and then select the calendar the recurrances briefly show up and then vanish again right away.
I did successfully import the recurrances into my personal Calendar but I need it to go to the sharepoint calendar to share it with the company :( any ideas?

kind regards
Jonas
This comment was minimized by the moderator on the site
This is very helpful, thank you! Do you have a specific VBA code for the import, but specifically goes to the "Birthday" calendar in Outlook?

Also, now that I've imported to my calendar, is there an easy way to remove all of those inputted, if needed?

Thank you!
This comment was minimized by the moderator on the site
Hello, Sam,
May be the below VBA code can do you a favor:

Sub ImportBirthdaysToCalendar()
'Updateby ExtendOffice
Dim xWs As Excel.Worksheet
Dim xRng As Range
Dim xOlApp As Outlook.Application
Dim xCalendarFld As Outlook.Folder
Dim xAppointmentItem As Outlook.AppointmentItem
Dim xRecurrencePattern As Outlook.RecurrencePattern
Dim xRow As Integer
On Error Resume Next
Set xWs = ThisWorkbook.ActiveSheet
Set xRng = Application.InputBox("Please select the data range (only two columns):", "Kutools for Excel", , , , , , 8)
If xRng Is Nothing Then Exit Sub
If xRng.Columns.Count <> 2 Then
  MsgBox "You can only select two columns", vbOKOnly + vbCritical, "Kutools for Excel"
  Exit Sub
End If
Set xOlApp = CreateObject("Outlook.Application")
'Set xCalendarFld = xOlApp.Session.GetDefaultFolder(olFolderCalendar)
Set xCalendarFld = xOlApp.Session.PickFolder
If xCalendarFld.DefaultItemType <> olAppointmentItem Then
  MsgBox "Please Select calendar folder. ", vbOKOnly + vbInformation, "Kutools for Outlook"
  Exit Sub
End If
For xRow = 1 To xRng.Rows.Count
  Set xAppointmentItem = xCalendarFld.Items.Add("IPM.Appointment")
  With xAppointmentItem
    .Subject = xRng.Cells(xRow, 1) & Chr(39) & "s Birthday"
    .AllDayEvent = True
    .Start = xRng.Cells(xRow, 2)
    Set xRecurrencePattern = .GetRecurrencePattern
    xRecurrencePattern.RecurrenceType = olRecursYearly
    .Save
  End With
Next
Set xWs = Nothing
Set xCalendarFld = Nothing
Set xOlApp = Nothing
End Sub


After running this code, you can create a new folder in the calendar, and the imported birthday will be saved in this new folder, if you need to remove the birthdays, you just need go to this folder, and delete them at once.
https://www.extendoffice.com/images/stories/comments/comment-skyyang/2023-comment/doc-import-birthday.png
This comment was minimized by the moderator on the site
Hi Skyyang,

I'm trying to use the code to import the birthdays into a Sharepoint Events List, which is located in my outlook as calendar, but when i run and then select the calendar the recurrances briefly show up and then vanish again right away.
I did successfully import the recurrances into my personal Calendar but I need it to go to the sharepoint calendar to share it with the company :( any ideas?

kind regards
Jonas
This comment was minimized by the moderator on the site
Hi Skyyang,

I'm trying to use the code to import the birthdays into a Sharepoint Events List, which is located in my outlook as calendar, but when i run and then select the calendar the recurrances briefly show up and then vanish again right away.
I did successfully import the recurrances into my personal Calendar but I need it to go to the sharepoint calendar to share it with the company :( any ideas?

kind regards
Jonas
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations