Quote:
Originally Posted by cksm4
I am assuming that the name of the control (1, 2, 3... etc) is based on its order. Is this true? Is it possible to name a control differently?
|
I believe so.
Also, once I have merged all my documents together, is there a way to run this by section?[/quote]Simple. Try something along the lines of:
Code:
Sub Demo()
Dim strTmp As String, iSctn As Integer
iSctn = InputBox("Which Section to process?")
If iSctn = "" Then Exit Sub
With ActiveDocument.Sections(iSctn).Range
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