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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find all templates with MergeField 1

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
I recently asked and got info on finding all .dot with a particular bookmark. Is it possible to find all .dot with a particular mergefield.

thanks in advance
 
When you have each file open (with the other code) you can try something like:
Code:
Dim oField As Word.Field

[COLOR=red]' the other code to get at each file[/color red]

For Each oField In ActiveDocument.Fields()
    If oField.Type = wdFieldMergeField Then
[COLOR=red]   ' do whatever test you want on the MergeField
    ' what exactly are you looking for?[/color red]
    End If
Next

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top