OK, after searching the forum again I think I may have answered the question myself. This code supplied by
macropod seems to do the trick...
Quote:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With ContentControl
If .Title = "Name" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11))
Exit For
End If
Next
ActiveDocument.SelectContentControlsByTitle("Title ").Item(1).Range.Text = StrDetails
End If
End With
End Sub
|
Thanks macropod!!!
To finish this off can someone point me in the right direction to have the
Name field auto-populate upon opening the document? I think this is a "built-in variable" but I don't know how to access it and populate it in the
Name field. Also, by auto-populating the Name field can I also auto-populate the
Title and if so, how?