Replacing Code inside Field "SET"

  • Thread starter Thread starter paraakaram
  • Start date Start date
P

paraakaram

Hi there,

I am using 2003, I am trying to write a macro which can do the following:

There are SET fields in my word document, I want to search these fields and
replace the Text inside these field with my Text

Regards
Paraakaram
 
What is the issue?

Dim afield As Field
For Each afield In ActiveDocument.Fields
If afield.Type = wdFieldSet Then
afield.Code = "your text"
End If
Next afield

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Back
Top