IncludeHiddenText Property Example
This example displays the text of the first sentence in the active document in a message box. The example uses the IncludeHiddenText property to include hidden text.
Set myRange = ActiveDocument.Sentences(1)
myRange.TextRetrievalMode.IncludeHiddenText = True
MsgBox myRange.Text
This example posts a message if the entire selection is formatted as hidden text.
If Selection.Type = wdSelectionNormal Then
Set myRange = Selection.Range
myRange.TextRetrievalMode.IncludeHiddenText = False
If myRange.Text = "" Then MsgBox "Selection is hidden"
End If