Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / September 2005

Tip: Looking for answers? Try searching our database.

Fields Used

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tywardreath - 02 Sep 2005 03:38 GMT
Hi

I have a shared database that is really large. Several people have created
mail merge documents only using a few of the database's fields. Is there a
way I can extract a list from Word of the mail merge fields used within a
document? If that is possible, is there a way to automate this process as
there are a LOT of mail merge files to go through (over 3,000).

Cheers, Tywardreath.
Greg Maxey - 02 Sep 2005 03:44 GMT
You might use a macro something like the following that will display a list
in the VBA immediate window:

Sub ListMergeFieldsInDoc()
Dim oFld As Field

For Each oFld In ActiveDocument.Fields
 If oFld.Type = wdFieldMergeField Then
   Debug.Print oFld.Code.Text
 End If
Next
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Hi
>
[quoted text clipped - 6 lines]
>
> Cheers, Tywardreath.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.