Private fields will almost certainly be marked as hidden, so you would only
see them with hidden text displayed. The following macro should remove them
from the document or template hidden or not.
Sub RemovePrivate()
Dim oSection As Section
Dim oStory As Range
Dim oHeader As HeaderFooter
Dim oFooter As HeaderFooter
With ActiveDocument
For Each oStory In .StoryRanges
For Each oField In oStory.Fields
If InStr(1, oField.Code, "PRIVATE") Then
oField.Delete
End If
Next oField
Next oStory
For Each oSection In .Sections
For Each oHeader In oSection.Headers
If oHeader.Exists Then
For Each oField In oHeader.Range.Fields
If InStr(1, oField.Code, "PRIVATE") Then
oField.Delete
End If
Next oField
End If
Next oHeader
For Each oFooter In oSection.Footers
If oFooter.Exists Then
For Each oField In oFooter.Range.Fields
If InStr(1, oField.Code, "PRIVATE") Then
oField.Delete
End If
Next oField
End If
Next oFooter
Next oSection
End With
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>