Sub ModifyHeaderFields()
Dim sec As Word.Section
Dim rng As Word.Range
Dim fld As Word.Field
Dim h As Word.WdHeaderFooterIndex
Set rng = Selection.Range
Set sec = rng.Sections(1)
For h = wdHeaderFooterPrimary To wdHeaderFooterEvenPages Step 2 'omit first page header
For Each fld In sec.Headers(h).Range.Fields
fld.Code.Text = Replace(fld.Code.Text, "REF bookmark_DE \h", "REF bookmark_EN \h")
Next fld
Next h
End Sub
|