francis
francis

Reputation: 31

VBA code to get hidden fields

Can anyone help me write a macro code which gets hidden field values from a word 2007 file ?

Upvotes: 0

Views: 830

Answers (1)

JMax
JMax

Reputation: 26591

You can try this :

Sub mySub()
Dim f As Variant

For Each f In ActiveDocument.Fields
    f.Select
    If Selection.Font.Hidden = True Then
        MsgBox "Field is hidden"
    End If
Next
End Sub

Upvotes: 2

Related Questions