How to Export Outlook Calendar to Excel?
Download Outlook Calendar Appointments to Excel using one of these 2 methods.- Outlook Calendar Export to CSV
- Outlook VBA to export Calendar to Excel
Outlook VBA to Export Calendar to Excel
Well. Here, there is not limitation with options. With the Outlook VBA, we will be able to control what needs to be exported. Any field, any date range, any Calendar item. Its all possible. Just copy paste the below code to Outlook VB editor, by pressing Alt + F11. Press F5 to execute this code as how it is done with Excel vba. Note: Include 'Microsoft Excel Object Library' from Tools -> ReferencesPrivate Sub Outlook_Vba_Get_Calendar_Item_Appoinments()
Dim oWorkbook As Workbook, Calendar_To_Excel_File As String
Dim oOutlook_Calendar As Outlook.Folder, oCalendar_Items As Outlook.Items
Dim oCalendarAppointment As Outlook.AppointmentItem
Dim iRow As Double
iRow = 1
'Change path of the Target File name if required
Calendar_To_Excel_File = "D:\Sample23434.xlsx"
'Check if Output File already exists
If VBA.Dir(Calendar_To_Excel_File) = "" Then
'To Create New Workbook
Set oWorkbook = Workbooks.Add
oWorkbook.SaveAs Calendar_To_Excel_File
Else
'To Refer Already Created Workbook
Set oWorkbook = Workbooks.Open(Calendar_To_Excel_File)
End If
'Get object reference for Outlook Calendar folder
Set oOutlook_Calendar = Outlook.Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar)
Set oCalendar_Items = oOutlook_Calendar.Items
'Loop Thru Each Items in Outlook Calendar
For Each oCalendarAppointment In oCalendar_Items
oWorkbook.Sheets(1).Cells(iRow, 1) = oOutlook_Calendar.FolderPath
oWorkbook.Sheets(1).Cells(iRow, 2) = oCalendarAppointment.Start
oWorkbook.Sheets(1).Cells(iRow, 3) = oCalendarAppointment.End
oWorkbook.Sheets(1).Cells(iRow, 4) = oCalendarAppointment.Subject
oWorkbook.Sheets(1).Cells(iRow, 5) = oCalendarAppointment.Location
oWorkbook.Sheets(1).Cells(iRow, 6) = oCalendarAppointment.Duration
oWorkbook.Sheets(1).Cells(iRow, 7) = oCalendarAppointment.Size
'oWorkbook.Sheets(1).Cells(irow, 8) = oCalendarAppointment.Body
iRow = iRow + 1
Next
'Save Excel Workbook With Calendar Appointments
oWorkbook.Save
oWorkbook.Close False 'Close Workbook without any Warning
MsgBox "Outlook Calendar Appointments Downloaded To:" & Calendar_To_Excel_File
End Sub
Once the code is executed, all the calendar items are exported to Excel file output.
This can be used to maintain all the appointments in one place & it is easy to refer, sort in Excel file rather than in Outlook Calendar.
Export Outlook Calendar Appointments to Excel or CSV
To extract all the calendar appointments from Outlook 2010 or above.- Open Microsoft Outlook app.
- Open Calendar section.
- Choose File Menu -> Open & Export.
- Click Import/Export -> 'Export to a file' -> 'Comma Separated Values'.
- Select which Calendar to export & Click Next.
- Type Output File name & Mapping for output fields.
- Click Finish & then Date range.