Others

Copy Assignment Text29 Values to Microsoft Project Tasks with VBA

Camila MilosovichCamila Milosovich Nov 14, 2026 868 views

Question details

Copy custom Text29 values from resource assignments to their corresponding Microsoft Project task rows.

Copy Assignment Text29 Values to Microsoft Project Tasks with VBA
Product
Microsoft Project
Device & OS
not provided
Scenario
Assignment-level Text29 fields contain values that need to appear in the related task-level Text29 fields.
Observed behavior
The assignment values are present, but the corresponding task summary rows are blank.
Before you start

Open the project in Microsoft Project and confirm that the values are in assignment Text29, not another custom text field. Check that task Text29 is editable and that the relevant tasks have direct assignments; this macro does not collect values from child tasks.

Solution 1Recommended

Run a VBA macro to copy assignment Text29 to each task

Use this method when each task should receive the first nonblank Text29 value from its own assignments.

The macro loops through the active project's tasks and their direct assignments. It overwrites task Text29 when it finds a nonblank assignment value, and leaves the task unchanged when it finds none.

A summary task without direct assignments will not receive values from its child tasks. Rolling child-task values up to a parent requires different logic.

1
Open the VBA editor

In Microsoft Project, open the project you want to update, then press Alt+F11 to open the Visual Basic Editor.

2
Insert the macro

In the Visual Basic Editor, select the project in the Project Explorer, choose Insert > Module, and paste this code: Sub CopyAssignmentText29ToTasks() Dim t As Task Dim a As Assignment For Each t In ActiveProject.Tasks If Not t Is Nothing Then For Each a In t.Assignments If Len(Trim$(a.Text29 & "")) > 0 Then t.Text29 = a.Text29 Exit For End If Next a End If Next t End Sub

3
Run the macro

Return to Microsoft Project, choose View > Macros > View Macros, select CopyAssignmentText29ToTasks, and click Run. Allow the macro only if your organization's security policy permits it.

4
Check the task values

In a task view, add or display the Text29 column and compare a few task values with their assignment Text29 values. Save the project after verifying the results.

Run a VBA macro to copy assignment Text29 to each task
Check the field reference: Both the assignment and task references must use Text29. A reference to Text1 would copy or update the wrong custom field.
Free Microsoft Office alternative

Use WPS Office for Project-Related Documents and Reports

WPS Office is a free, lightweight alternative for editing documents, spreadsheets, and presentations in a familiar interface. It supports common Microsoft Office formats for an easier transition, but it does not run Microsoft Project VBA or perform this Text29 update.

Prepare and review project reports in spreadsheets and documentsCompatible with common Microsoft Office formats, including XLSX, DOCX, and PPTXUse a familiar interface for everyday office tasksWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Which assignment value is copied if a task has several resources?

The macro copies the first nonblank assignment Text29 value it encounters, then stops checking that task's remaining assignments.

Will the macro populate a summary task from its child tasks?

No. It checks only assignments directly attached to each task. A summary task with no direct assignments needs different roll-up logic to collect values from child tasks.

What happens to an existing task Text29 value?

The macro overwrites it if the task has a direct assignment with a nonblank Text29 value. If none is found, the existing task value remains unchanged.

How can I check that the macro used the correct field?

Open the macro in the Visual Basic Editor and confirm that both the assignment reference and the task reference say Text29, not Text1. Then display the task Text29 column and compare it with the assignment values.