Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to create Outlook reminders from Excel spreadsheet?

This article is talking about creating Outlook reminders based on data of Excel spreadsheet.

Crete Outlook reminders from Excel spreadsheet with VBA code

Kutools for Outlook: 100+ New Advanced Tools for Outlook.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu: Bring Old Menus and Toolbars Back to Office 2007, 2010, 2013, 2016 and 2019.

Crete Outlook reminders from Excel spreadsheet with VBA code

If you want to create Outlook reminders from Excel, please do as follows.

1. Create a worksheet contains the column headers and corresponding reminder fields as below screenshot shown.

Note: For the busy status column, number 2 means that the reminder will be shown as Busy in your Outlook calendar. You can change it to 1 (Tentative), 3 (Out of Office), 4 (Working elsewhere), or 5 (Free) as you need.

2. Press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

3. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the Code window.

VBA code: Create Outlook reminders from Excel spreadsheet

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

Note: In the above code, A2:G2 is the data range that you want to create appointments based on.

4. Press the F5 key or click the Run button to run the code. Then all the appointments with specific fields will be inserted into the calendar of your Outlook at once.

And then, you can go to the Calendar of your outlook to view the results, See screenshot: 



Kutools for Outlook

More than 100 Advanced Functions for Outlook 2010, 2013, 2016, 2019 and 365

screen shot kutools for outlook tiny for banner 201812

More Features  |  Free Download  |  Only $39.00 for hundreds of functions

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Alexandra · 10 days ago
    Hello! Love the idea of this code, but I have a few questions:


    1. It won't run because of the "bug" on this line (error 440, Run time error):
    xOutItem.ReminderMinutesBeforeStart = xRg.Cells(I, 6).Value
    2. If I don't necessarily want to put the column headers from A2:G2, can i just simply change it in the code (ex: F3-K3), will it still work?
    3. How does it know to connect to my outlook?


    Thank you for your response, I'd really appreciate it!
  • To post as a guest, your comment is unpublished.
    Michelle · 24 days ago
    Hello, thank you for the code but I'm struggling with it only putting in the first entry in excel into Outlook. How do i get it to enter in all line items?
    Here is my code, I added in a category color


    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) + xRg.Cells(I, 8).Value
    xOutItem.Duration = xRg.Cells(I, 4).Value
    xOutItem.Categories = xRg.Cells(I, 9).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
  • To post as a guest, your comment is unpublished.
    Riaz · 3 months ago
    Hi There,

    Great formula/code.


    What happens that this code generates multiple entries in the outlook calendar if its run more than once by mistake. I also wanted it to be setup as a template so that staff can use it. They can put in the dates and rest of the details are required and when they run it should list the entries in outlook calendar. Any deleted excel data should be deleted from outlook as well and same applies to any changes. When I save the excel spreadsheet it saves in the default excel format, but I want it to be saved with Macros so that it does not lose the code and staff can use it as many times as needed. Can you please advise and make relevant changes to the code? Thanks
    • To post as a guest, your comment is unpublished.
      crystal · 2 months ago
      Hi,
      For saving the macros for future use in the Workbook, you need to click File > Save As > Browse > select a folder to save the workbook > choose “Excel Macro-enabled Workbook” from the Save as type drop-down > Save.