메인 컨텐츠로 가기

Excel 스프레드 시트에서 Outlook 미리 알림을 만드는 방법은 무엇입니까?

이 기사에서는 Excel 스프레드 시트의 데이터를 기반으로 Outlook 미리 알림을 만드는 방법에 대해 설명합니다.

VBA 코드가있는 Excel 스프레드 시트의 Crete Outlook 미리 알림


VBA 코드를 사용하여 Excel 스프레드시트에서 Outlook 미리 알림 만들기

Excel에서 Outlook 미리 알림을 만들려면 다음과 같이하십시오.

1. 아래 스크린 샷과 같이 열 머리글과 해당 알림 필드가 포함 된 워크 시트를 만듭니다.

주의 사항: 바쁜 상태 열, 번호 2 알림이 다음과 같이 표시됨을 의미합니다. 바쁜 Outlook 일정에서. 당신은 그것을 변경할 수 있습니다 1 (예정), 3 (부재중), 4 (다른 곳에서 일하기)5 (무료) 필요에 따라

2. 누르세요 다른 + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

3. 에서 응용 프로그램 용 Microsoft Visual Basic 창을 클릭합니다 끼워 넣다 > 모듈. 그런 다음 VBA 코드 아래를 코드 창에 복사하십시오.

VBA 코드 : Excel 스프레드 시트에서 Outlook 미리 알림 만들기

Sub AddAppointments()
'Update by Extendoffice 20180608
    Dim I As Long
    Dim xRg As Range
    Dim xOutApp As Object
    Dim xOutItem As Object
    Set xOutApp = CreateObject("Outlook.Application")
    Set xRg = Range("A2:G2")
    For I = 1 To xRg.Rows.Count
        Set xOutItem = xOutApp.createitem(1)
        Debug.Print xRg.Cells(I, 1).Value
        xOutItem.Subject = xRg.Cells(I, 1).Value
        xOutItem.Location = xRg.Cells(I, 2).Value
        xOutItem.Start = xRg.Cells(I, 3).Value
        xOutItem.Duration = xRg.Cells(I, 4).Value
        If Trim(xRg.Cells(I, 5).Value) = "" Then
            xOutItem.BusyStatus = 2
        Else
            xOutItem.BusyStatus = xRg.Cells(I, 5).Value
        End If
        If xRg.Cells(I, 6).Value > 0 Then
            xOutItem.ReminderSet = True
            xOutItem.ReminderMinutesBeforeStart = xRg.Cells(I, 6).Value
        Else
            xOutItem.ReminderSet = False
        End If
        xOutItem.Body = xRg.Cells(I, 7).Value
        xOutItem.Save
        Set xOutItem = Nothing
    Next
    Set xOutApp = Nothing
End Sub

주의 사항: 위 코드에서 A2 : G2 약속을 작성할 기준이되는 데이터 범위입니다.

4. 누르세요 F5 키를 누르거나 실행 버튼을 클릭하여 코드를 실행합니다. 그러면 특정 필드가있는 모든 약속이 Outlook 일정에 한 번에 삽입됩니다.

그런 다음 Outlook의 달력으로 이동하여 결과를 볼 수 있습니다. 스크린 샷보기 : 


최고의 사무 생산성 도구

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

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

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

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

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

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

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

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

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

 

 

Comments (66)
Rated 5 out of 5 · 2 ratings
This comment was minimized by the moderator on the site
How can I make this module run automatically when I close Excel? That way I can input data, and only have to close the file without having to manually run the code?
This comment was minimized by the moderator on the site
Hi JAIME GARCIA,
To make the AddAppointments subroutine run automatically when you close the Excel workbook, you can apply the following VBA code. This event is triggered right before the workbook is closed. Here's how you can adjust the code to run when the workbook is closed:
1. Open the Excel workbook where you want this functionality.
2. Press Alt + F11 to open the VBA editor.
3. In the Project Explorer on the left side, find ThisWorkbook under the VBAProject for your workbook.
4. Double-click ThisWorkbook to open its code module.
5. In the code window for ThisWorkbook, insert the following code.
6. Now you need to save this workbook as Excel Macro-Enabled Workbook (click File > Save As > choose Excel Macro-Enabled Workbook from Save as Type drop-down list > click Save).

Note: In this code, be sure to replace "SheetName" with the actual name of the worksheet containing your appointment data.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    AddAppointments
End Sub

Sub AddAppointments()
    ' Updated by Extendoffice 20180608
    Dim I As Long
    Dim xRg As Range
    Dim xOutApp As Object
    Dim xOutItem As Object
    Set xOutApp = CreateObject("Outlook.Application")
    Set xRg = ThisWorkbook.Sheets("SheetName").Range("A2:G2") ' Replace "SheetName" with the actual name of your sheet
    
    For I = 1 To xRg.Rows.Count
        Set xOutItem = xOutApp.createitem(1)
        xOutItem.Subject = xRg.Cells(I, 1).Value
        xOutItem.Location = xRg.Cells(I, 2).Value
        xOutItem.Start = xRg.Cells(I, 3).Value
        xOutItem.Duration = xRg.Cells(I, 4).Value
        xOutItem.BusyStatus = IIf(Trim(xRg.Cells(I, 5).Value) = "", 2, xRg.Cells(I, 5).Value)
        xOutItem.ReminderSet = xRg.Cells(I, 6).Value > 0
        xOutItem.ReminderMinutesBeforeStart = IIf(xOutItem.ReminderSet, xRg.Cells(I, 6).Value, 0)
        xOutItem.Body = xRg.Cells(I, 7).Value
        xOutItem.Save
        Set xOutItem = Nothing
    Next I
    Set xOutApp = Nothing
End Sub
This comment was minimized by the moderator on the site
Hello:

Thank you all for this amazing forum. I hope you will forgive me if this has already been asked, but is there a way to tweak the code to create an Outlook TASK instead of an appointment?

Please advise.

David
Rated 5 out of 5
This comment was minimized by the moderator on the site
How can I revise the code to include multiple rows?
This comment was minimized by the moderator on the site
HI Miller,

In this line Set xRg = Range("A2:G2") of the code, simply change the range "A2:G2" to a range containing multiple rows, such as "A2:G10"
This comment was minimized by the moderator on the site
This is a great tool. Was wondering if there is a way to add the appointments to a shared calendar, instead of my personal outlook calendar.
This comment was minimized by the moderator on the site
HI Crystal,
the code worked find, but I made some changes in Table & run the code again, now I have 2 reminders for same event, how to remove 1st reminder from my outlook calendar.
This comment was minimized by the moderator on the site
Hi Sushant Gawali,

The code only helps you to create reminders from Excel. If a duplicate reminder is created, you will need to go to the Outlook calendar to delete it manually. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
If we share the excel with other user and they run this micro-enabled filed, will they have all the invites saved?
This comment was minimized by the moderator on the site
Hi,
If you save this Excel file as an Excel Macro-Enabled Workbook and send it to someone else, the invitation will be saved in their Outlook calendar after running the VBA code.
This comment was minimized by the moderator on the site
Excellent, thanks!
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hi Crystal,

Thank you for letting me know.
This comment was minimized by the moderator on the site
Thank you for posting your code, it works perfectly for me for adding to Outlook. Is there a way to add it to a Google Calendar instead?

Thanks.
This comment was minimized by the moderator on the site
Hi David Ramsay,
I can’t fix this problem. Sorry about that.
This comment was minimized by the moderator on the site
Hello,

For some reason it won’t pull all dates.
My range is A2:C14 and it seems to cherry pick dates. Any tips?
This comment was minimized by the moderator on the site
Hi Hailey,
You may need to attach a screenshot or a sample file to describe the problem you encountered more clearly.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations