메인 컨텐츠로 가기

 Outlook에서 생일이 오늘 인 경우 연락처에 자동으로 인사말 메시지를 보내는 방법은 무엇입니까?

때때로 Outlook에서 생일이 오늘 인 연락처에게 자동으로 인사말 메시지를 보낼 수 있습니다. 연락처의 생일을 하나씩 확인하고 인사 메일을 수동으로 보내면 지루한 일이 될 것입니다. 이 기사에서는 빠르고 쉽게 해결할 수있는 VBA 코드를 소개합니다.

Outlook의 VBA 코드를 사용하여 생일을 기준으로 인사말 메시지를 연락처에 자동으로 보냅니다.


Outlook의 VBA 코드를 사용하여 생일을 기준으로 인사말 메시지를 연락처에 자동으로 보냅니다.

생일이 오늘 인 경우 연락처에 자동으로 인사말을 보내려면 먼저 VBA 코드를 삽입 한 다음 코드를 트리거하는 반복 작업을 만들어야합니다.

다음 단계가 도움이 될 수 있습니다.

1. Outlook을 시작한 다음 ALT + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

2. 에서 응용 프로그램 용 Microsoft Visual Basic 창, 더블 클릭 ThisOutlook세션 인사말 프로젝트 1 (VbaProject.OTM) 창을 열어 모드를 연 다음 다음 코드를 복사하여 빈 모듈에 붙여 넣습니다.

VBA 코드 : 생일을 기준으로 연락처에 인사말 메시지를 자동으로 보냅니다.

Private Sub Application_Reminder(ByVal Item As Object)
Dim xTempMail As MailItem
Dim xFilePath As String
Dim xItems As Outlook.Items
Dim xItem As Object
Dim xContactItem As Outlook.ContactItem
Dim xTodayDate As String
Dim xBirthdayDate As String
Dim xGreetingMail As Outlook.MailItem
Dim xWordDoc As Word.Document
Dim xGreetings As String
Dim xBool As Boolean
xFilePath = CreateObject("shell.Application").NameSpace(5).self.Path & "\UserTemplates"
Set xFSO = CreateObject("Scripting.FileSystemObject")
If xFSO.FolderExists(xFilePath) = False Then
    MkDir xFilePath
End If
If IsFileExists(xFilePath & "\Birthday Greeting Mail.oft") = False Then
    Set xTempMail = Outlook.CreateItem(olMailItem)
    xTempMail.SaveAs xFilePath & "\Birthday Greeting Mail.oft", olTemplate
    xTempMail.Close olDiscard
End If
If (TypeOf Item Is TaskItem) And (Item.Subject = "Send Birthday Greeting Mail") Then
xGreetings = "Happy Birthday!"
           xGreetings = InputBox("Input birthday greetings", "Kutools for Outlook", xGreetings)
   xTodayDate = Month(Date) & "-" & Day(Date)
   Set xItems = Outlook.Application.Session.GetDefaultFolder(olFolderContacts).Items
   For Each xItem In xItems
       If Not (TypeOf xItem Is ContactItem) Then Exit Sub
       Set xContactItem = xItem
       xBirthdayDate = Month(xContactItem.Birthday) & "-" & Day(xContactItem.Birthday)
       If xBirthdayDate = xTodayDate Then
           Set xGreetingMail = Outlook.Application.CreateItemFromTemplate(xFilePath & "\Birthday Greeting Mail.oft")
           Set xWordDoc = xGreetingMail.GetInspector.WordEditor
           
           xWordDoc.Range.InsertBefore "Dear " & xContactItem.LastName & Chr(10) & xGreetings & Chr(10) & Chr(10)
           With xGreetingMail
                .Recipients.Add (xContactItem.Email1Address)
                .Subject = "Happy Birthday!"
                .Display
                .Close (olSave)
                .Send
          End With
       End If
   Next
End If
End Sub
Function IsFileExists(ByVal FileName As String) As Boolean
Dim xFileSystem As Object
Set xFileSystem = CreateObject("Scripting.FileSystemObject")
If xFileSystem.FileExists(FileName) = True Then
    IsFileExists = True
Else
    IsFileExists = False
End If
End Function 

3. 그럼 클릭하세요 도구 > 참고자료 FBI 증오 범죄 보고서 응용 프로그램 용 Microsoft Visual Basic 창, 튀어 나온 참조 -Project1 대화 상자, 확인 Microsoft Word 개체 라이브러리Microsoft 스크립팅 런타임 옵션에서 사용 가능한 참조 목록 상자, 스크린 샷 참조 :

4. 그런 다음 OK 대화 상자를 닫으려면 이제 VBA 코드를 트리거하는 작업을 만들어야 합니다. 다음으로 이동하세요. 태스크 창에서 새 작업 작업을 생성하려면:

(1.) 안으로 주제t 라인에 제목을 다음과 같이 입력해야 합니다. 생일 인사말 메일 보내기;

(2.) 그런 다음 회귀 아래 태스크 탭;

(3.) 작업 반복 대화 상자에서 매일 지정 1일마다 옵션에서 반복 패턴 섹션;

5. 그런 다음 OK 대화 상자를 닫고 작업 창으로 돌아가려면 다음 스크린샷과 같이 반복 작업에 대한 알림을 설정하세요.

6. 이제부터 미리 알림이 울리면 매크로가 즉시 실행됩니다. 다음 스크린샷과 같이 생일 인사말을 삽입하라는 대화 상자가 나타납니다.

7. 그런 다음 OK 버튼을 누르면 오늘 생일인 연락처에게 자동으로 인사말 메일이 발송됩니다.


최고의 사무 생산성 도구

Outlook 용 Kutools - 귀하의 전망을 강화하는 100개 이상의 강력한 기능

🤖 AI 메일 도우미: AI 마법이 적용된 즉각적인 전문가 이메일 - 원클릭으로 천재적인 답변, 완벽한 어조, 다국어 숙달이 가능합니다. 손쉽게 이메일을 변환하세요! ...

📧 이메일 자동화: 부재중(POP 및 IMAP에서 사용 가능)  /  이메일 보내기 예약  /  이메일 발송 시 규칙에 따른 자동 참조/숨은참조  /  자동 전달(고급 규칙)   /  인사말 자동 추가   /  여러 수신자 이메일을 개별 메시지로 자동 분할 ...

📨 이메일 관리: 이메일을 쉽게 기억할 수 있습니다.  /  제목 및 기타 사기 이메일 차단  /  중복 이메일 삭제  /  고급 검색  /  폴더 통합 ...

📁 첨부 파일 프로일괄 저장  /  일괄 분리  /  일괄 압축  /  자동 저장   /  자동 분리  /  자동 압축 ...

🌟 인터페이스 매직: 😊더 예쁘고 멋진 이모티콘   /  탭 보기로 Outlook 생산성 향상  /  문을 닫는 대신 전망을 최소화하세요 ...

???? 원클릭 불가사의: 수신 첨부 파일과 함께 전체 회신  /   피싱 방지 이메일  /  🕘발신자의 시간대 표시 ...

👩🏼‍🤝‍👩🏻 연락처 및 캘린더: 선택한 이메일에서 연락처 일괄 추가  /  연락처 그룹을 개별 그룹으로 분할  /  생일 알림 제거 ...

이상 100 특징 당신의 탐험을 기다려주세요! 더 알아보려면 여기를 클릭하세요.

 

 

Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Good morning,
I've set this up exactly as outlined, I have Kutools installed, however, there's no Macro popup when the reminder activates. What information can I provide you to help me solve this?
This comment was minimized by the moderator on the site
how he come to know who's birthday is today.you not mention, from where he pick detail of the employee.one more thing, i want to send birthday mail to all employee email id.
This comment was minimized by the moderator on the site
I am using this code with outlook 2016. Followed all the steps but kutool popup is not coming as mentioned in last step
This comment was minimized by the moderator on the site
hay alguna forma para mac?
This comment was minimized by the moderator on the site
Buen día, podría indicar cómo el código obtiene y valida la fecha de nacimiento??? . Otra consulta es si funciona para una lista de usuarios. Es decir que valide sus fechas de nacimiento y les envíe automáticamente saludos de cumpleaños. Muchas gracias
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations