Mail merge is typically used to send mass emails that have been personalized to their recipient (like replacing “Hello! ?” with “Hey John!”).
Doing a mail merge in Word gives you all of the functionality of a mailing list, without the need to configure an expensive email platform. Set CalFolder = olNs.A mail merge is a fantastic way to save you time when you’re emailing a large recipient list.
If you need to send it to multiple addresses, you'll need to use the split function then loop the attendee code to add each address separately. If your CSV has the fields in a different order, change the column number in in the appointment code, for example. to send to multiple names, you need to resolve each name. ** Note: The attendees and resources are limited to group in this macro. Do not use a location if you are adding a resource.Īs written for the macro below, the fields in the CSV are, left to right: To use, select a cell in the row you wish to use then run the macro. This Excel macro is used to create an appointment using the data in the selected row. Set tzEnd = (timezoneend)ĭim tzStart As TimeZone, tzEnd As TimeZone If you need to use different time zones for each appointment, add the time zone names to the spreadsheet and add the time zones like this:ĭim timezonestart As Variant, timezoneend As Variant This sample creates appointments in the default calendar from Excel data. You can create the appointments in different time zones. ReminderMinutesBeforeStart = Cells(i, 9)Ĭreate Appointments in Different Time Zones 'Loop through the items in the collection. Set ResItems = CalItems.Restrict(sFilter)
'create the Restrict filter by day and recurrence" ' create search string to find events to delete Set olApp = CreateObject("Outlook.Application") Set olApp = GetObject(, "Outlook.Application") This macro is also available in this text file.ĭim olAppt As Object 'Outlook.AppointmentItemĭim CalFolder As Object 'Outlook.MAPIFolder The appointments created with this macro will use the default reminder times configured in your Outlook at the time of the import. This macro uses late-binding you do not need to set a reference to Outlook to use it. ReminderMinutesBeforeStart = Cells(i, 9) Set Excel's VBA security to low, then paste the macro into Excel's VBA editor and run the macro. To use, create a spreadsheet with the fields in this order: Subject, Location, Body, Category, Start, Start Time, End, End Time, Reminder. This version of the macro creates all of the appointments in one calendar. MsgBox "An error occurred - Exporting items to Calendar." ReminderMinutesBeforeStart = Cells(i, 10) 'MsgBox subFolder, vbOKCancel, "Folder Name" Set subFolder = CalFolder.Folders(arrCal) Set CalFolder = olNs.GetDefaultFolder(olFolderCalendar) Tip: If all appointments start and/or end at the same time, you can set a specific time value instead of getting it from the spreadsheet: You'll also need to set a reference to the Outlook object model in Excel's VBA Editor's Tools, References dialog.Ī version of the macro that skips previously imported events is here. The calendar's listed in Column A need to exist, Outlook won't create them.