Export Microsoft Project Tasks to an Outlook Calendar
Question details
Transfer tasks from Microsoft Project plans to Outlook and keep calendar entries current when plans change.

- Product
- Microsoft Project and Microsoft Outlook
- Device & OS
- not provided
- Scenario
- The user receives updates for several project plans and wants to add their tasks to Outlook without an external conversion service.
- Observed behavior
- Project tasks need to appear as Outlook appointments, with revised tasks updated and obsolete entries identified for removal.
The VBA approach below requires desktop Microsoft Project and classic Outlook for Windows with an accessible default calendar; it does not work in new Outlook. Check your organization's macro policy, and choose a distinct, permanent sync name for each project plan.
Create or update Outlook appointments with a Project VBA macro
Use this local macro to sync dated, non-summary tasks from the active project to the default Outlook calendar.
The macro matches appointments using a project sync name and each task's Project Unique ID. Reuse the same sync name for every update of the same plan, and use a different name for each project.
The macro does not delete appointments. Tasks without valid start and finish dates are skipped, and tasks with a zero or negative duration receive a 30-minute appointment. Review the resulting times and date ranges in Outlook.
Open the project plan in Microsoft Project, press Alt+F11, and choose Insert > Module.
Paste the following code into the module: Sub SyncTasksToOutlook() Dim ol As Object, cal As Object, appt As Object, item As Object, prop As Object Dim t As Task, projectKey As String, taskKey As String Dim startTime As Date, endTime As Date projectKey = Trim(InputBox("Enter the permanent sync name for this project:")) If projectKey = "" Then Exit Sub Set ol = CreateObject("Outlook.Application") Set cal = ol.GetNamespace("MAPI").GetDefaultFolder(9) For Each t In ActiveProject.Tasks If Not t Is Nothing Then If Not t.Summary Then If IsDate(t.Start) And IsDate(t.Finish) Then taskKey = projectKey & "|" & CStr(t.UniqueID) Set appt = Nothing For Each item In cal.Items If item.Class = 26 Then Set prop = item.UserProperties.Find("ProjectTaskSyncKey") If Not prop Is Nothing Then If CStr(prop.Value) = taskKey Then Set appt = item Exit For End If End If End If Next item If appt Is Nothing Then Set appt = cal.Items.Add("IPM.Appointment") Set prop = appt.UserProperties.Add("ProjectTaskSyncKey", 1) prop.Value = taskKey End If startTime = CDate(t.Start) endTime = CDate(t.Finish) If endTime <= startTime Then endTime = DateAdd("n", 30, startTime) appt.Subject = "[" & projectKey & " | Task " & t.UniqueID & "] " & t.Name appt.Start = startTime appt.End = endTime appt.Save End If End If End If Next t MsgBox "Sync complete. Review your Outlook calendar and remove obsolete entries manually." End Sub
In Project, open View > Macros, select SyncTasksToOutlook, and click Run. Enter the project's permanent sync name when prompted, then check the appointments in classic Outlook.
Open each revised plan in Project and run the macro again with the same sync name. In Outlook Calendar, use View > Change View > List and search for the sync name; compare the task IDs in appointment subjects with the current plan before deleting obsolete entries.

Work with exported project data in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents and spreadsheets. It can help you review project data exported to a compatible spreadsheet, but it does not run the Project-to-Outlook sync described above or directly replace Microsoft Project.

Frequently Asked Questions
Will the macro create duplicates when I import an updated plan?
It updates a matching appointment when the project sync name and task Unique ID are unchanged. If you change the sync name or recreate a task with a new Unique ID, a new appointment can be created.
Does the macro remove appointments for deleted tasks?
No. In Outlook Calendar, choose View > Change View > List, search for the project's sync name, and compare the task IDs with the current plan before deleting obsolete appointments.
Can I export the tasks directly to an ICS file instead?
A direct ICS export may require custom VBA or an intermediate application. The macro on this page creates Outlook appointments; it does not generate an ICS file.
Which Outlook calendar receives the appointments?
The macro uses the default calendar in the Outlook profile through GetDefaultFolder(9). It must be modified to target another calendar.
Why is a Project task missing from Outlook?
The macro skips summary tasks and tasks without valid start and finish dates. Check those fields in Project, then run SyncTasksToOutlook again from View > Macros.




