



To use, select the Group calendar you need to clear then run the macro. This macro clears the Group Calendar but does not send cancelation messages - if you need to send cancelations, you'll need to cancel each meeting "the old fashioned way". Because each event is a meeting, you can't simply delete everything, you need to cancel the meetings and send the Cancelation. One thing I quickly discovered when testing the macro was how tedious it is to delete events from a group calendar.

MsgBox "An error occurred - Exporting items to Calendar." ReminderMinutesBeforeStart = xlSheet.Cells(i, 9) Set CalFolder = ĭo Until Trim(xlSheet.Cells(i, 1).Value) = "" Set xlApp = CreateObject("Excel.Application") Set xlApp = GetObject(, "Excel.Application")Īpplication.StatusBar = "Please wait while Excel source is opened. StrPath = enviro & "\Documents\appointments.xlsx" You'll need to identify the Group Folder using Set CalFolder = and select the Group Calendar before running the macro. The Excel version of this macro is here: " Create Appointments Using Spreadsheet Data". To use, open the Group Calendar you want to add the appointments to and run the macro. If the appointment data is stored in a CSV or Excel workbook, you can import the worksheet using this Outlook macro. If objPattern.RecurrenceType = olRecursYearNth Then If objPattern.RecurrenceType = olRecursYearly Then If objPattern.RecurrenceType = olRecursMonthNth ThenĬApptPattern.DayOfWeekMask = cApptPattern.DayOfWeekMask If objPattern.RecurrenceType = olRecursMonthly ThenĬApptPattern.DayOfMonth = cApptPattern.DayOfMonth If objPattern.RecurrenceType = olRecursWeekly ThenĬApptPattern.DayOfWeekMask = objPattern.DayOfWeekMask Set cApptPattern = cAppt.GetRecurrencePatternĬApptPattern.StartTime = objPattern.StartTimeĬApptPattern.EndTime = objPattern.EndTimeĬApptPattern.RecurrenceType = objPattern.RecurrenceTypeĬApptPattern.PatternStartDate = objPattern.PatternStartDateĬApptPattern.Interval = objPattern.IntervalĬApptPattern.NoEndDate = objPattern.NoEndDateĬApptPattern.Duration = objPattern.DurationĬApptPattern.Occurrences = cApptPattern.OccurrencesĬApptPattern.PatternEndDate = objPattern.PatternEndDate Set objPattern = obj.GetRecurrencePattern Subject = obj.Subject & Format(Time, " hh:mm:ss") 'you are viewing the group calendar to add them to Set objFolder = Session.GetDefaultFolder(olFolderCalendar).folders("CopyGroups") To use, add the appointments you need on the group calendar to a calendar folder in your mailbox then select the group calendar you want to add them to and run the macro. This macro does not copy exceptions (it will handle recurrences). This macro will copy appointments from a calendar in your mailbox (this example uses a subfolder under your calendar folder called "CopyGroups") to the group calendar and sends the meeting (which is required to add it to the group calendar and sync to the server.) The second macro below created appointments using data stored in CSV files or Excel Wordbooks. Do not import them into your own calendar as the macro creates a copy of everything in the source calendar into the Group Calendar and sends invites to all group members. ics file, you'll need to import the events into an Outlook Calendar (or open the ics file as a Calendar).
