• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Import meetings from a CSV or XLSX file

Slipstick Systems

› Developer › Code Samples › Import meetings from a CSV or XLSX file

Last reviewed on September 16, 2019     89 Comments

Importing meeting details from an CSV or Excel .xlsx file won't send meeting requests. If you want to import meetings and then send them to the attendees, you will need to use a macro to create the meeting from the spreadsheet data.

Begin by creating an Excel file with the following column headers:
Subject, Location, Required Invitees, Categories, Start Date, End Date, Start Time, End Time, Reminder, Duration, Optional Attendee, Resource. (You can add other Outlook fields, if needed.)

Add meeting details to a spreadsheet

Create one row for each meeting, using a semicolon as the delimiter if you have more than one attendee per meeting. Save the workbook as either a CSV or as a native Excel (*.xlsx) file. (Yes, you can import Excel .xlsx files when you use a macro.)

Note: when you have more than one attendee, the name resolution dialog may come up when you use .Send in the macro. Avoid it by clicking the Send button yourself, after the macro creates all of the meeting requests.

Create meetings macro

If you just want to create appointments, remove the lines that apply to myAttendee and the line that sets the meeting status.

Because we're using Set xlApp = CreateObject("Excel.Application") we don't need to set a reference to Microsoft Excel Object Model in the VB Editor's Tools, References dialog. This makes the code a little more portable, as the user doesn't have to set the reference before using the code.

If we use Set xlApp = New Excel.Application a reference would be required.

Sub CreateMeetingsfromCSV()
    
 ' Worksheet format: Subject, Location, Required Invitees, Categories, Start_Date, End_Date, Start_Time, End_Time, Reminder, Duration, Optional Attendees, Resource
 ' Possible Values for Reminder Field is :'No Reminder','0 Minutes','1 Day','2 Days', '1 Week'
    
    Dim xlApp As Object 'Excel.Application
    Dim xlWkb As Object ' As Workbook
    Dim xlSht As Object ' As Worksheet
    Dim rng As Object 'Range
    Dim objAppt As Outlook.AppointmentItem
    Dim myAttendee As Outlook.Recipient
    Dim myOptional As Outlook.Recipient
    Dim myResource As Outlook.Recipient
    
    'Set xlApp = New Excel.Application
    Set xlApp = CreateObject("Excel.Application")
    
    strFilepath = xlApp.GetOpenFilename
    If strFilepath = False Then
        xlApp.Quit
        Set xlApp = Nothing
        Exit Sub
    End If
     
    Set xlWkb = xlApp.Workbooks.Open(strFilepath)
    Set xlSht = xlWkb.Worksheets(1)
    Dim iRow As Integer
    Dim iCol As Integer
    
    iRow = 2
    iCol = 1
     
    While xlSht.Cells(iRow, 1) <> ""
    
Set objAppt = Application.CreateItem(olAppointmentItem)
    
    Set myAttendee = objAppt.Recipients.Add(xlSht.Cells(iRow, 3))
          myAttendee.Type = olRequired
    Set myOptional = objAppt.Recipients.Add(xlSht.Cells(iRow, 11))
          myOptional.Type = olOptional
    Set myResource = objAppt.Recipients.Add(xlSht.Cells(iRow, 12))
          myResource.Type = olResource

       
        With objAppt
                .Subject = xlSht.Cells(iRow, 1) & Now()
                .Location = xlSht.Cells(iRow, 2)
                .Categories = xlSht.Cells(iRow, 4)
                .Start = xlSht.Cells(iRow, 5) + xlSht.Cells(iRow, 7)
           ' Use either .Duration or .End
                '.End = xlSht.Cells(iRow, 6) + xlSht.Cells(iRow, 8)
                .Duration = xlSht.Cells(iRow, 10) 
           ' This tells Outlook it's a meeting    
               .MeetingStatus = olMeeting 

   Select Case xlSht.Cells(iRow, 9)
        Case "No Reminder"
            .ReminderSet = False
        Case "0 minutes"
            .ReminderSet = True
            .ReminderMinutesBeforeStart = 0
        Case "1 day"
            .ReminderSet = True
            .ReminderMinutesBeforeStart = 1440
        Case "2 days"
            .ReminderSet = True
            .ReminderMinutesBeforeStart = 2880
        Case "1 week"
            .ReminderSet = True
            .ReminderMinutesBeforeStart = 10080
    End Select
    
    For Each myAttendee In .Recipients
        myAttendee.Resolve
    Next
        .Save
        .Display
        '.Send ' hit the send button yourself to avoid Select names dialog 
        End With
        iRow = iRow + 1
    Wend
    
    xlWkb.Close
    xlApp.Quit
    Set xlWkb = Nothing
    Set xlApp = Nothing
 
End Sub

How to use macros

First: You will need macro security set to low during testing.

To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To put the code in a module:

  1. Right click on Project1 and choose Insert > Module
  2. Copy and paste the macro into the new module.

More information as well as screenshots are at How to use the VBA Editor

More Information

Original version of the macro: Import Appointments FROM Excel

Import meetings from a CSV or XLSX file was last modified: September 16th, 2019 by Diane Poremsky

Related Posts:

  • How to Create Messages Using Data in an Excel File
  • Create Outlook Folders from a List of Folder Names
  • Copy data from Outlook email tables to Excel
  • Send Email to Addresses in an Excel Workbook

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
89 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

kierran (@guest_219229)
April 22, 2022 11:20 am
#219229

Hi, This code is awesome, the only issue I am having with it is that the it is only pulling the start date and not the start time across to the meeting invitation with the issue being with the " + xlSht.Cells(iRow, 7) ". Same with the end time. The code runs fine without it. Any suggestions?

0
0
Reply
Joe Davis (@guest_219108)
January 24, 2022 8:25 am
#219108

I know this is an old thread, but I would like to specify which calendar to import the cvs data into versus into my default calendar. Any help would be appreciated!

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Joe Davis
January 24, 2022 9:54 pm
#219114

Select the calendar then start the import wizard - it should go into that calendar. The exception: if its not in an account in your profile. If its a shared mailbox, you need to import them move - create a new calendar folder, import into it then move the events to the correct calendar. (Use a list view on the calendar so you can select all).

0
0
Reply
Joe Davis (@guest_219118)
Reply to  Diane Poremsky
January 25, 2022 7:14 am
#219118

Hi Diane,

Thanks so much for the reply! I have tried that solution before commenting here and the script still places it on my main default calendar. I have even totally unchecked all calendars so that my Test calendar is the only one open, and still get same results.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Joe Davis
January 25, 2022 8:57 am
#219119

Oh, shoot, my bad. I wasn't thinking straight... when you use a macro, you need to change the folder it is using.

Where is the calendar?

This uses the default calendar -
Set objAppt = Application.CreateItem(olAppointmentItem)

To use a different folder, you need to set the folder then .add the event. This will add the event to subfolder under Calendar, called new calendar -

Dim CalFolder As Outlook.MAPIFolder
 Set CalFolder = olNs.GetDefaultFolder(olFolderCalendar).Folders("new calendar")
  Set objAppt = CalFolder.Items.Add(olAppointmentItem)

(That sample is from Create Appointments Using Spreadsheet Data)

0
0
Reply
Robbie Shelson (@guest_217979)
April 22, 2021 10:25 am
#217979

Hi Dianne, this script is amazing and comes in very handy for me to send out MULTIPLE invites at once!

Is there a way this can be modified to choose which outlook account the meeting invite is sent from?

I used to be able to change it in the dialogue that meeting invite that popped up, but since changing to O365 and having our accounts set up differently, I cannot!

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Robbie Shelson
December 15, 2021 6:20 pm
#218981

Is the other address an account in your profile? If so, the macro to send meeting requests from another account should work -
https://www.slipstick.com/developer/send-using-default-or-specific-account/#meeting

put this before the line tyo create the new appt item.
Dim oAccount As Outlook.Account

For Each oAccount In Application.Session.Accounts
If oAccount = "account@displayname" Then

Set objAppt = Application.CreateItem(olAppointmentItem)
With objAppt
.SendUsingAccount = oAccount
' add subject and other fields

if its a shared mailbox, you would just need to add this to the With block - put it before the .subject line.
.SentOnBehalfOfName = "alias@domain.com"

0
0
Reply
Nicole Yamamoto (@guest_217539)
February 8, 2021 7:48 pm
#217539

In the excel picture posted with this article, is there any special format for the "Required Attendees" column for the csv upload?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Nicole Yamamoto
February 8, 2021 9:59 pm
#217540

it's a simple text field - I don't recall if I tested it with hyperlinks in the field.

1
0
Reply
Michael Coleman (@guest_215880)
September 16, 2020 3:21 pm
#215880

This is great. I was already using this process without the macro, but this helps me understand it a bit better. Is it possible to cancel meetings using this process as well?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Michael Coleman
September 17, 2020 1:24 am
#215882

I have not tried, but it should be possible if the event is on the outlook calendar. You'd use vba to find it then cancel.

0
0
Reply
Jeannine Moegenburg (@guest_213679)
July 25, 2019 4:11 pm
#213679

Diane- This code rocks! Thanks so much for pulling it together & answering all the questions.

We've got it working, now we want to do one additional thing. We want to have it send from a sub-calendar of mine. Any thoughts on how to do this?

0
0
Reply
Chev (@guest_212984)
March 27, 2019 11:18 pm
#212984

Hi Diane,
Just wondering - if you wanted to save the files as a ics file to a specific file location (e.g. in the documents folder), how would you do that?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Chev
March 27, 2019 11:29 pm
#212985

Do you want to use a macro to export the calendar as an ics or to convert a csv to an ics ?

I dont have a macro that does a direct csv to ics conversion, but i have one that could save the calendar as an ics.

0
0
Reply
Bernardo Senra (@guest_215238)
Reply to  Diane Poremsky
May 20, 2020 12:37 am
#215238

Hi Diane. Thank you so much for the code. It's really helpful. Is it possible for you to share the macro code to save the calendar as an .ics, please?

0
0
Reply
stuart (@guest_208977)
October 12, 2017 11:01 pm
#208977

Thanks Diane.
I am trying to make se of your great code here, but note that all my Meeting Dates which I schedule are ALL appearing on the Calendar as 30/12/1899 and no matter what I do, it always comes back with this same date >>>

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  stuart
October 13, 2017 12:13 am
#208978

That points to a problem with the date format in the cells. What format are you using on the cells? The standard short date format should work... avoid formats with words.

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 15

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • How to Remove the Primary Account from Outlook
  • Disable "Always ask before opening" Dialog
  • Adjusting Outlook's Zoom Setting in Email
  • This operation has been cancelled due to restrictions
  • Remove a password from an Outlook *.pst File
  • Reset the New Outlook Profile
  • Maximum number of Exchange accounts in an Outlook profile
  • Save Attachments to the Hard Drive
  • How to Hide or Delete Outlook's Default Folders
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
  • Classic Outlook is NOT Going Away in 2026
  • Use PowerShell to Delete Attachments
  • Remove RE:, FWD:, and Other Prefixes from Subject Line
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Classic Outlook is NOT Going Away in 2026

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Newest Code Samples

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment