Igor,
Lets assume you have two text CCs. One is titled "Name" and tagged
"CustomerName" the other is titled "Date" and tagged "SalesDate."
There are several ways to work with and manipulate these controls.
1. A ContentControl is part of an indexed collection of ContentControls.
This means that you can work with them by index number:
Sub ManipulateCCsByIndex()
ActiveDocument.ContentControls(1).Range.Text = "Igor"
ActiveDocument.ContentControls(2).Range.Text = "6/22/2009"
End Sub
When a CC is created Word assigns it a unique ID. You can obtain this ID by
selecting the control and running this bit of code:
Sub GetCCID()
MsgBox Selection.Range.ContentControls(1).ID
End Sub
Sub ManipulateCCsByID()
ActiveDocument.ContentControls("932358501").Range.Text = "Igor"
ActiveDocument.ContentControls("932358504").Range.Text = "6/22/2009"
End Sub
Note: your unique ID number will be different than mine.
You can work with CCs by title. Since you can have more that one CC with
the same title you must include the item number (i.e., first, second, third,
etc.)
Sub ManipulateCCsByTitle()
ActiveDocument.SelectContentControlsByTitle("Name").Item(1).Range.Text =
"Igor"
End Sub
or the same thing by tag:
Sub ManipulateCCsby Tag
ActiveDocument.SelectContentControlsByTag("SalesDate").Item(1).Range.Text =
"6/22/2009"
End Sub
Personally I think working with the unique ID is the more robust method.