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

Office Tab - Enable Tabbed Editing and Browsing in Office, and Make Work Much Easier...
Kutools for Outlook - Brings 100 Powerful Advanced Features to Microsoft Outlook
  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by rules; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails at once; Auto Add Greeting when reply; Auto Add Date&Time into subject...
  • Attachment Tools: Auto Detach, Compress All, Rename All, Auto Save All... Quick Report, Count Selected Mails, Remove Duplicate Mails and Contacts...
  • More than 100 advanced features will solve most of your problems in Outlook 2010-2019 and 365. Full features 60-day free trial.

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 - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
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.
    vineet · 19 days ago
    when we use VBA code for reminder then error shows
    Compliler error :
    User define type is not define
    after press ok button
    cursor move on DIM xRg as Range

    please help...??
  • To post as a guest, your comment is unpublished.
    Sandi · 1 months ago
    If I use this in a gantt chart and I update due dates must I re run? Is there an easy way to remove from calendar without deleting each individual one?
  • To post as a guest, your comment is unpublished.
    Shruthy · 3 months ago
    Hi,

    Is it possible to use code to make entry on group calendar in outlook?
    • To post as a guest, your comment is unpublished.
      crystal · 26 days ago
      Hi,
      Sorry can't help solving the problem yet.
  • To post as a guest, your comment is unpublished.
    Carlos Xavier · 3 months ago
    Do you know how i can put a all day event?
    • To post as a guest, your comment is unpublished.
      crystal · 26 days ago
      Hi,
      Sorry can't help solving the problem yet.
  • To post as a guest, your comment is unpublished.
    singgih · 5 months ago
    dear webmaster
    thank you for the code. I have a problem as it failed to implemented. (run-time error '-21447467263 (80004001)' : Not implemented.
    when I press the debug button it highlights the "xOutItem.Save" code line 28.
    could you give solution of this issue?
    regards
    Singgih
    • To post as a guest, your comment is unpublished.
      crystal · 4 months ago
      Hi singgih,
      Sorry for replying so late. I need to know your Excel version in order to figure out the problem. Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    H · 5 months ago
    Hi Crystal! Great code.

    I need to add/invite attendees. Any idea?
  • To post as a guest, your comment is unpublished.
    Dharma · 5 months ago
    how to add others attendees as well in this appointment.
    • To post as a guest, your comment is unpublished.
      crystal · 5 months ago
      Hi Dharma,
      Sorry the probem can't be solved yet. Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    cb · 6 months ago
    this code works but only for the first entry. How do you adjust it for range: Sheet3!A2:G17 ?

    I changed the code to say: Set xRg = Range("Set xRg = Range("A2:G2") Yet it still only picks the first line up in outlook.
    • To post as a guest, your comment is unpublished.
      crystal · 5 months ago
      Good day,
      Please replace the line Set xRg = Range("A2:G2") with Set xRg = Worksheets("Sheet3").Range("A2:G17").
      Thank you for your comment.
      • To post as a guest, your comment is unpublished.
        Andre · 5 months ago
        Hi Crystal,
        I already replaced the line and it works, but 'body' in second row and so on are not come out in reminder, but only picks first row.
        Please advise..
  • To post as a guest, your comment is unpublished.
    Keith · 7 months ago
    Hello, the code seems very helpful but has one drawback, If the file is updated continuously it will create a new reminder each time it is run. Can a line be added to delete all previous reminders and then create new ones?
    Also can this be exported to multiple outlook accounts?
    • To post as a guest, your comment is unpublished.
      crystal · 5 months ago
      Hi Keith,
      Sorry can't help you with that. You need to delete all previous reminders manually in Outlook. And the reminders are added to the default Outlook account only. Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    Alexandra · 9 months 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.
      crystal · 8 months ago
      Hi Alexandra,
      The 440 error didn't occur in my case. Which Office version do you use?
      The code won't work if you simply change the code to F3:K3. If you need the answer, i will try to figure it out.
      This line "Set xOutApp = CreateObject("Outlook.Application")" will help to connect the Excel data to the Outlook application.
      Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    Michelle · 9 months 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.
      Dennis Briggs · 7 months ago
      I'm having the same issue, the code works great but is only adding the first appointment to the calendar. Here is my code:
      <code>
      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
      </code>
      • To post as a guest, your comment is unpublished.
        mog · 1 months ago
        You need to change Set xRg = Range("A2:G2") to be A":wherever your data ends, so if you have 20 rows it will be A2:G20.
  • To post as a guest, your comment is unpublished.
    Riaz · 1 years 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 · 11 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.