Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving mailmerge fields from s source document

Status
Not open for further replies.

BazF

MIS
Oct 13, 2016
1
GB
I need some help please. I need to list out all mailmerge fields from a Word source document so I can run a mailmerge to retrieve data for checking our database.
I need some vba which will read through the sourcedocument and output all fields to a word document and including the mailmerge formatting.
Reason is the word Sourcedocument has over 2000 merge fields and doing it manually would take hours .

i,e In WORD,
click Mailings , Insert Merge Fields, then select each field.


Thanks
 
Your approach is entirely wrong - all you're doing is creating new mergefields, not generating anything like a report of the fields actually used in the document (or their formatting). For what you want, simply open the mailmerge main document and delete everything that isn't a mergefield.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top