-----Original Message-----
Hi Paul,
Looping is easy, coding to rename the fields according to
anything but the simplest pattern is a little tougher.
To cycle through the formfields collection, you must, um,
cycle through the formfields collection:

Ordinarily
you'd want to use a For Each loop for that:
Dim ff as FormField
For Each ff in ActiveDocument.FormFields
<---manipulations here
Next ff
BUT: Unless you want to assign them names according to
some aardvark random series, you're more likely to need
something like this:
Dim i As Long
For i = 1 To ActiveDocument.FormFields.Count
ActiveDocument.FormFields(i).Name = "foobar" & i
Next
If you have different sorts of formfields and you want
to note the field type in its name somehow, you might
use:
Dim i As Long
For i = 1 To ActiveDocument.FormFields.Count
With ActiveDocument
If .FormFields(i).Type = wdFieldFormTextInput Then
.FormFields(i).Name = "MyTextField" & i
ElseIf .FormFields(i).Type = wdFieldFormCheckBox Then
.FormFields(i).Name = "MyChex" & i
:
: and so on
:
End If
End With
Next i
As you can see, the more automatic your renaming becomes, the
the less flexible your naming can be. That isn't always the
best situation, but to be sure, with 100 formfields you don't
likely want to give individualized names to each. Dalmatians
they ain't. Post back if this doesn't answer your question
fully.
--
Mark Tangard, Microsoft Word MVP
Please reply only to the newsgroup, not by private email.
Note well: MVPs do not work for Microsoft.
"Life is nothing if you're not obsessed." --John Waters
.