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

Copy Recurring Appointment Series to Appointments

Slipstick Systems

› Developer › Copy Recurring Appointment Series to Appointments

Last reviewed on February 9, 2018     40 Comments

Applies to: Outlook (classic), Outlook 2007, Outlook 2010

This code creates appointments from a selected recurring appointment. It picks up the appointment's start date (see warning below!) and creates appointments from the start date up to 30 days in the future, if the recurring appointment does not have an end date set.

The code gets the subject from the date of the selected appointment and creates a filter, so only the selected recurring appointment series is copied to appointments. If you have more than one appointment series with the same subject, appointments will be created for each series, since the filter uses the subject. Edit the subject of the series you want to copy so it is unique.

If you just need a list of dates, see How to print a list of recurring dates using VBA. To copy just a single occurrence to an appointment, see Copy Selected Occurrence to Appointment.

Using the macro

This macro was tested in Outlook 2010, Outlook 2007 and Outlook 2003. It should work with at least Outlook 2002 as well (it's built off the Outlook 2002 macro listed in More Information).

However, the filter (sFilter) needs to be edited for older versions, as [IsRecurring] does not work. Use this instead:

sFilter = "[Start] >= '1/1/2000' And [End] < '" & tEnd & "' And [Subject] = " & strSubject

Also, leading or ending spaces (" My Appointment" or "My Appointment ") in the subject will cause the macro to fail with 0 appointments found. Removing the spaces from the subject should take care of it. You could also move or copy the recurring appointment to a new Calendar folder and remove the subject filter.

When you select an appointment in Day/Week/Month view, the start date is for the selected occurrence, not the first appointment in the series. When you select the series in list view, it will use the very first date of the appointment. For this reason, I recommend using list view with this macro. I also recommend leaving the Message Box popup in the code and assigning categories to the copies. It makes it easier to identify inconsistencies before removing the original appointment series. See Tweaking the Macro for additional filter options

I recommend testing this macro first by creating (or copying) a recurring event (or two) to a second Calendar folder and running the code while viewing that folder.

Run a macro from the Developer tab
Outlook 2010 users can customize the QAT or ribbon with a button for the macro (File, Custom ribbon or Quick Access toolbar commands) or you can show the Developer ribbon and run it from the Macros button.

In older versions of Outlook, run the macro from the Tools, Macros menu or customize the toolbar and assign the macro to a toolbar button.

Convert Recurring Appointments to Appointments

Open the VBA Editor using Alt+F11. Expand the Project to display ThisOutlookSession on the left. Double click to open it and paste the code below into the right side. Select a calendar folder then run the macro.

To use, select a recurring appointment or meeting and run the macro. I highly recommend using list view when you use this macro.

Press the Break key on your keyboard to end macro if it is running longer than a few minutes and you are not using a date filter.

Sub ConvertRecurring()
    
   Dim CalFolder As Outlook.MAPIFolder
   Dim CalItems As Outlook.Items
   Dim ResItems As Outlook.Items
   Dim sFilter, strSubject As String
   Dim iNumRestricted As Integer
   Dim itm, newAppt As Object
   Dim tStart, tEnd As Date
   Dim recAppt As Object

   ' Use the selected calendar folder
   Set CalFolder = Application.ActiveExplorer.CurrentFolder
    
   Set recAppt = Application.ActiveExplorer.Selection.Item(1)
   ' Get all of the appointments in the folder
   Set CalItems = CalFolder.Items
 
   ' Sort all of the appointments based on the start time
   CalItems.Sort "[Start]"
 
   ' Include the recurrences from the selected date forward
   CalItems.IncludeRecurrences = True
    
   ' Pick up the Start Date of the selected appointment occurrence
   ' Use a List view to get all occurrences
    tStart = Format(recAppt.Start, "Short Date")
    
 ' macro limits all appt to 30 days from now
 ' so you can end a series early 
  tEnd = Format(Now + 30, "Short Date")

   ' Pick up the selected appointment's subject
    strSubject = recAppt.Subject
  
   'create the Restrict filter
   sFilter = "[Start] >= '" & tStart & "'" & " And [End] < '" & tEnd & "' And  [IsRecurring]  = True And [Subject] = " & Chr(34) & strSubject & Chr(34)
   
   ' Apply the filter to the collection
   Set ResItems = CalItems.Restrict(sFilter)
 
   iNumRestricted = 0
 
   'Loop through the items in the collection.
   For Each itm In ResItems
      iNumRestricted = iNumRestricted + 1
       
  Set newAppt = ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)
 
  newAppt.Start = itm.Start
  newAppt.End = itm.End
  newAppt.Subject = itm.Subject & " (Copy)"
  newAppt.Body = itm.Body
  newAppt.Location = itm.Location
  newAppt.Categories = "Test Code, " & itm.Categories
  newAppt.ReminderSet = False
   
' Copies attachments to each appointment.
  If itm.Attachments.Count > 0 Then
    CopyAttachments itm, newAppt
  End If
         
  newAppt.Save
 
   Next
 
   ' Display the actual number of appointments created
     MsgBox (iNumRestricted & " appointments were created"), vbOKOnly, "Convert Recurring Appointments"
 
   Set itm = Nothing
   Set newAppt = Nothing
   Set ResItems = Nothing
   Set CalItems = Nothing
   Set CalFolder = Nothing
   
End Sub
 
Sub CopyAttachments(objSourceItem, objTargetItem)
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set fldTemp = fso.GetSpecialFolder(2) ' TemporaryFolder
   strPath = fldTemp.Path & "\"
   For Each objAtt In objSourceItem.Attachments
      strFile = strPath & objAtt.FileName
      objAtt.SaveAsFile strFile
      objTargetItem.Attachments.Add strFile, , , objAtt.DisplayName
      fso.DeleteFile strFile
   Next
 
   Set fldTemp = Nothing
   Set fso = Nothing
End Sub

Tweaking the Macro

If you want to create appointments for all recurring series in the selected calendar, remove the subject from the filter and use a generic start date, or hard-code a date. By using a start date far in the past, you can select any date in the Day, Week, or Month view.
Remember: [IsRecurring] doesn't work in Outlook 2007 and under.

Use a specific start (or end) date

Use a filter with the start date hard-coded:

sFilter = "[Start] >= '1/1/2000' And [End] < '" & tEnd & "' And  [IsRecurring]  = True And [Subject] = " & strSubject

Use a start date in the past:

tStart = Format(Now - 365, "Short Date")
sFilter = "[Start] >= '" & tStart & "'" & " And [End] < '" & tEnd & "' And  [IsRecurring]  = True"

To use a specific end date, replace tEnd with the date:

sFilter = "[Start] >= '1/1/2000' And [End] < '1/1/2016' And  [IsRecurring]  = True And [Subject] = " & strSubject

Include attendees names in appointments

To include a list of meeting invitees in the appointment body, use

newAppt.Body = "Attendees: " & itm.RequiredAttendees & itm.OptionalAttendees & vbCrLf & itm.Body

This will add your own name on appointments (you are always 'attending').

Convert all appointments in a series

To convert all events in the series, replace tEnd = Format(Now + 30, "Short Date") with the following code. If the series doesn't have an end date, appointments are created through one year from now. (The start date is the appointment start, if selected in list view.)

Change the 2 and 1 as needed.

   Dim oPattern As RecurrencePattern
   Set oPattern = recAppt.GetRecurrencePattern
    tEnd = oPattern.PatternEndDate
    
    ' if no end date or more than 2 years into the future
    ' then 1 year from now
    ' date for 'if tEnd >' should always be equal or higher
    If tEnd > Format(Now, "mm/dd/") & Format(Now, "yyyy") + 2 Then
        tEnd = Format(Now, "mm/dd/") & Format(Now, "yyyy") + 1 
    End If

More Information

OL2002: Incorrect Count Property Using Recurring Appointments

Copy Recurring Appointment Series to Appointments was last modified: February 9th, 2018 by Diane Poremsky

Related Posts:

  • Copy Selected Occurrence to an Appointment
  • How to print a list of recurring dates using VBA
  • See all dates in a recurring series
  • Create Outlook appointments using multiple recurring patterns

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
40 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Joris Linssen (@guest_212478)
January 4, 2019 3:27 am
#212478

This is a great solution for an obviously missing feature in Outlook, so thanks for that! To make the solution even more complete I've added the code newAppt.BusyStatus = itm.BusyStatus to my implementation of the macro, in order to carry over the busy/free/tentative state of the recurring appointment.

0
0
Reply
Ken (@guest_208421)
August 28, 2017 5:32 pm
#208421

I receive "0 appointments were created" in Outlook 2013 running this on a recurring meeting copied from another calendar. The original appointment was created with Outlook 2003. This appointment is the only one in this calendar.

I see an IsRecurring property in Item 1 of CalItems, but tried using the pre-2007 sFilter, but get the same results. ResItems is empty.

I noticed that after setting the CalItems,IncludeRecurrences to true, the CalItems.count = 2147483647 and CalItems.Item 1.ConversationID changes from something that looks like a GUID to .

It seems like the filter isn't working.

Any Ideas?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Ken
August 30, 2017 12:55 am
#208443

This: CalItems.count = 2147483647 is normal - outlook doesn't actually count each specific occurrence, it counts between the start and end, resulting in the weird value. I've used it with both outlook 2013 and 2016, so the version is not the problem. I'll see if i can repro.

Ohhh... when you copied the meeting, did it copy the series or just the single occurrence? Outlook has been known to copy only the single occurrence.

0
0
Reply
casonsemail (@guest_190398)
April 16, 2015 9:02 am
#190398

I get: Run-time Error '91' Object Variable or With Block not set..

Set newAppt = ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)
newAppt.MessageClass = "IPM.Appointment.PMAppointment-v4"

With newAppt

.Start = itm.Start
.End = itm.End
.Subject = itm.Subject
.Body = itm.Body
.Location = itm.Location
.Categories = itm.Categories
.ReminderSet = False

.Save

'calling user-defined fields from form
Set objProp = newAppt.UserProperties.Add("ProjectName", olText, True)
objProp.Value = itm.UserProperties("ProjectName").Value
.Save

End With

' Copies attachments to each appointment.
If itm.Attachments.Count > 0 Then
CopyAttachments itm, newAppt
End If

newAppt.Save

Next

' Display the actual number of appointments created
MsgBox (iNumRestricted & " appointments were created"), vbOKOnly, "Convert Recurring Appointments"

Set itm = Nothing
Set newAppt = Nothing
Set ResItems = Nothing
Set CalItems = Nothing
Set CalFolder = Nothing
Set objProp = Nothing

End Sub

0
0
Reply
casonsemail (@guest_190347)
April 15, 2015 1:50 pm
#190347

Hi Diane, thanks for the additional input. I'm not entirely certain what the problem is. After I made those modifications, I no longer get the mismatch error, but the value simply doesn't carry over into the field on the form. I'll do some additional research and see if I can find a solution. If I do, I'll share it back here.

Thanks for your help.

Best,
Cason

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  casonsemail
April 15, 2015 2:38 pm
#190350

Uncomment error handling code and try adding value to this:
objProp.Value = itm.UserProperties("ProjectName").value

0
0
Reply
Denis (@guest_190341)
April 15, 2015 4:44 am
#190341

Thank you so much!

0
0
Reply
Denis (@guest_190318)
April 14, 2015 11:29 am
#190318

Hi Diane,

Application.ActiveExplorer.Selection.Item(1) it looks like this line is taking out one appointment at a time, is there a way to change this so that the script will take out all appointments in the folder?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Denis
April 14, 2015 4:44 pm
#190320

You should be able to do that. You need to check each event and make sure it's recurring then move on to the next one.
In a quickie test, this macro worked on all recurring appt.
Convert all recurring appt macro

0
0
Reply
casonsemail (@guest_190003)
March 26, 2015 8:57 am
#190003

I've added the field, and entered the code, but I am getting a mismatch error. I've modified the code so it is uniform with your previous recommendations. I'm sure this is attributable to my lack of knowledge, but could you show me how to declare these values using the code you've previously provided? Thank you.

Set newAppt = ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)
newAppt.MessageClass = "IPM.Appointment.PMAppointment-v3"
Set objProp = newAppt.UserProperties.Add("ProjectName", olText, True)

With newAppt

.Start = itm.Start
.End = itm.End
.Subject = itm.Subject
.Body = itm.Body
.Location = itm.Location
.Categories = itm.Categories
.ReminderSet = False

.Save
'calling user-defined fields from form
.UserProperties("ProjectName").Value = itm.UserProperties("ProjectName")

.Save
End With

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  casonsemail
April 14, 2015 4:51 pm
#190321

I think you can set the Set objProp and objProp.value right before With newappt line, but they will also work before the Save -

Dim objProp As Outlook.UserProperty

Set newAppt = ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)
newAppt.MessageClass = "IPM.Appointment.PMAppointment-v3"

With newAppt

.Start = itm.Start
.End = itm.End
.Subject = itm.Subject
.Body = itm.Body
.Location = itm.Location
.Categories = itm.Categories
.ReminderSet = False

.Save
'calling user-defined fields from form

Set objProp = newAppt.UserProperties.Add("ProjectName", olText, True)
objProp.Value = itm.UserProperties("ProjectName")

.Save
End With

0
0
Reply
casonsemail (@guest_189911)
March 18, 2015 8:35 am
#189911

Hi Diane, apologies that the code didn't copy over properly. I'm not trying to filter on the UDF. I was simply trying to copy the field values over. This is the code I have using your suggestions, but it still is not working. I've looked in the "all fields" tab in developer mode in Outlook, and my fields are there, so I'm not sure what is going on. Thank you for any additional troubleshooting you can help with.

Set newAppt = ActiveExplorer.CurrentFolder.Items.Add(olAppointmentItem)
newAppt.MessageClass = "IPM.Appointment.PMAppointment-v3"

With newAppt

.Start = itm.Start
.End = itm.End
.Subject = itm.Subject
.Body = itm.Body
.Location = itm.Location
.Categories = itm.Categories
.ReminderSet = False

.Save
'calling user-defined fields from form

.UserProperties("ProjectName") = itm.UserProperties("ProjectName")
.UserProperties("ProjectOwner") = itm.UserProperties("ProjectOwner")
.UserProperties("ProjectDescription") = itm.UserProperties("ProjectDescription")

.Save
End With

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  casonsemail
March 24, 2015 11:58 pm
#189990

if the field doesn't exist, you need to add it.
Dim objProp As Outlook.UserProperty
Set objProp = newAppt.UserProperties.Add("ProjectName", olText, True)
objProp.Value = itm.UserProperties("ProjectName")

0
0
Reply

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

Latest EMO: Vol. 30 Issue 16

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
  • How to Hide or Delete Outlook's Default Folders
  • Reset the New Outlook Profile
  • Save Attachments to the Hard Drive
  • Add Attachments and Set Email Fields During a Mail Merge
  • Outlook SecureTemp Files Folder
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • 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
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

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

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

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

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

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