Updated. Try it now.
Quote:
Is the added sub so I only need to change the tutor info in one properties box for them all to change?
|
That is quite possible, but I was loath to assume every reference to a tutor should be changed. The current approach requires each subject & session run by that tutor to at least be considered, which is a safeguard against both: (a) updating all instances when only a few need updating; and (b) overlooking some if they were to be done manually (which is still possible). For code to update all instances, you might use:
Code:
Sub BulkUpdateTutor()
Dim i As Long, j As Long, OldTutor As String, NewTutor As String
OldTutor = Trim(InputBox("Old Tutor"))
NewTutor = Trim(InputBox("New Tutor", , OldTutor))
If OldTutor = "" Then Exit Sub
With ActiveDocument
For i = 1 To .SelectContentControlsByTitle("Subject").Count
With .SelectContentControlsByTag("Subject_" & i)(1)
For j = 1 To .DropdownListEntries.Count
With .DropdownListEntries(j)
If Trim(.Value) = OldTutor Then
.Value = Replace(.Value, OldTutor, NewTutor)
End If
End With
Next
End With
Next
End With
End Sub