Thanks for your help.
But I do not get the field name I get a error message at the line "msgbox
af.code" since code is a field type of "Range".
I am still in the same problem now.
All I need to do is to loop through all the merge fields in the
word document and create an array and replace the mergefields with the
values I get from the database.
Any suggestion will be of great help.
Try
af.Code.Text
But you will have to strip off the MERGEFIELD, white space, and any quotes
to get the name of the field, and it may not match the one in the data
source if, for example, the data source has field names longer than around
32 characters. And so on...
Peter Jamieson
> Thanks for your help.
> But I do not get the field name I get a error message at the line "msgbox
[quoted text clipped - 17 lines]
>> > How can I Loop through all the mail mertge fields in a document
>> > and display the field Name?
Edwin Patrick - 09 Mar 2005 22:57 GMT
Thanks a lot guys.
It worked.
many thanks.
> Try
>
[quoted text clipped - 28 lines]
> >> > How can I Loop through all the mail mertge fields in a document
> >> > and display the field Name?