Bulk Upload Tasks To Outlook
This blog explains about how to add a list of reminders/appointments from Excel to Outlook Calendar.
If the list of reminders to be added is a huge list, Manually creating the entries in Outlook Calendar would be a time consuming task. This article explains about automating this task.
Topics Related to Excel Calendar Option:
Lets see how to Export and Import tasks between Outlook and Excel.
Create a new Excel workbook with below header in Sheet1 and add some sample Appointments.
- Column 1 – “Subject”
- Column 2 – “Location”
- Column 3 – “Reminder (Number of Days)”
- Column 4 – “Reminder (In Hrs)”
- Column 5 – “Reminder (In Mins)”
Add Reminder1234567891011121314151617181920212223242526Private Sub Add_Appointments_To_Outlook_Calendar()'Include Microsoft Outlook nn.nn Object Library from Tools -> ReferencesDim oAppt As AppointmentItemDim Remind_Time As Doublei = 2Subj = ThisWorkbook.Sheets(1).Cells(i, 1)'Loop through entire list of Reminders to be addedWhile Subj <> ""Set oAppt = Outlook.Application.CreateItem(olAppointmentItem)oAppt.Subject = SubjoAppt.Location = ThisWorkbook.Sheets(1).Cells(i, 2)oAppt.Start = ThisWorkbook.Sheets(1).Cells(i, 3)Remind_Time = ThisWorkbook.Sheets(1).Cells(i, 4) * 24 * 60 + ThisWorkbook.Sheets(1).Cells(i, 5) * 60 + ThisWorkbook.Sheets(1).Cells(i, 6)oAppt.ReminderMinutesBeforeStart = Remind_TimeoAppt.AllDayEvent = TrueoAppt.Savei = i + 1Subj = ThisWorkbook.Sheets(1).Cells(i, 1)WendMsgBox "Reminder(s) Added To Outlook Calendar"End Sub
- Press Alt+F11 and insert the below code for the command button.
- Note: Include Microsoft Outlook nn.nn Object Library from Tools -> References
- Enter the list of reminders that has to be added to the Calendar and
- Execute the above code. The reminders will be added to the Outlook Calendar.
Download Appointments to Excel
Use the below code to Fetch Appointment details from Outlook Calendar.
Note: Include Microsoft Outlook nn.nn Object Library from Tools -> ReferencesVisual Basic12345678910111213141516171819202122232425Private Sub Get_Appoinments()Dim mybk As WorkbookDim FolderCal As Outlook.FolderDim ItemsApt As Outlook.ItemsDim appt As Outlook.AppointmentItemi = 1Set mybk = ThisWorkbookSet FolderCal = Outlook.Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar)Set ItemsApt = FolderCal.ItemsFor Each appt In ItemsAptmybk.Sheets(1).Cells(i, 1) = appt.Startmybk.Sheets(1).Cells(i, 2) = appt.Endmybk.Sheets(1).Cells(i, 3) = appt.Subjectmybk.Sheets(1).Cells(i, 4) = appt.Locationmybk.Sheets(1).Cells(i, 5) = appt.Durationmybk.Sheets(1).Cells(i, 6) = appt.Size'mybk.Sheets(1).Cells(i, 7) = appt.Bodyi = i + 1NextMsgBox "OutLook Appointments Retrieved"End Sub
How to Add and Read Outlook Calendar Appointments