Dim af As Field
For Each af In ActiveDocument.Fields
If af.Type = wdFieldMergeField Then
MsgBox af.Code
End If
Next af
Use the Mid() function to get rid of the MERGEFIELD if you don't want to
display it.
--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
"Edwin Patrick" wrote in message
...
How can I Loop through all the mail mertge fields in a document
and display the field Name?
|