Hi Brock,
Your reference in previous posts to fields and forms led me to believe you were working with formfields.
Nonetheless, the same principles apply:
Code:
Sub Demo()
Dim strTmp As String
With ActiveDocument
strTmp = .ContentControls(1).Range.Text
strTmp = strTmp & ":" & .ContentControls(2).Range.Text
strTmp = strTmp & ":" & .ContentControls(3).Range.Text
.Indexes.MarkEntry Range:=.Bookmarks("IndexThis").Range, _
Entry:=strTmp, CrossReference:="", CrossReferenceAutoText:="", _
BookmarkName:="", Bold:=False, Italic:=False
End With
End Sub
If you were to bookmark the controls, you could retrieve the text via the bookmarks:
Code:
Sub Demo()
Dim strTmp As String
With ActiveDocument
strTmp = .Bookmarks("BkMk1").Range.ContentControls(1).Range.Text
strTmp = strTmp & ":" & .Bookmarks("BkMk2").Range.ContentControls(1).Range.Text
strTmp = strTmp & ":" & .Bookmarks("BkMk3").Range.ContentControls(1).Range.Text
.Indexes.MarkEntry Range:=.Bookmarks("IndexThis").Range, _
Entry:=strTmp, CrossReference:="", CrossReferenceAutoText:="", _
BookmarkName:="", Bold:=False, Italic:=False
End With
End Sub
Note how the bookmarks change, but we're always referring to the first content control within the bookmarked range.