Replacing Code inside Field "SET"

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
 
D

Doug Robbins - Word MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top