Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.14 KB

Word.TextRetrievalMode.md

File metadata and controls

40 lines (26 loc) · 1.14 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
TextRetrievalMode object (Word)
vbawd10.chm2361
vbawd10.chm2361
Word.TextRetrievalMode
b76ad3a6-efc2-4abb-abb4-b8128577bbf2
06/08/2017
medium

TextRetrievalMode object (Word)

Represents options that control how text is retrieved from a Range object.

Remarks

Use the TextRetrievalMode property to return a TextRetrievalMode object. The following example displays the text of the first sentence in the active document, excluding field codes and hidden text.

With ActiveDocument.Sentences(1).TextRetrievalMode 
 .IncludeHiddenText = False 
 .IncludeFieldCodes = False 
 MsgBox .Parent.Text 
End With

Changing the ViewType, IncludeHiddentText, or IncludeFieldCodes property of the TextRetrievalMode object doesn't change the screen display. Instead, changing one of these properties determines what text is retrieved from a Range object when the Text property is used.

See also

Word Object Model Reference

[!includeSupport and feedback]