I have the following code inserted into a (much) larger macro. For some reason it will not change the content control field in the word document I am trying to edit. The spelling matches the field in the doc exactly (including the cap in the wrong place.) etc. Other (similar) code just below it seems to be working just fine. Where do I start to find the problem here?
[vba]For i = 1 to wdDoc.ContentControls.Count
If wdDoc.ContentControls.(i).Title = "coverPages" then
wdDoc.ContentControls (i).range.text = "4"
End If
Exit For
Next
[/vba]