Propriedade Find. realce (Word)Find.Highlight property (Word)
True se a formatação de realce está incluído nos critérios de localização.True if highlight formatting is included in the find criteria. Long de leitura/gravação.Read/write Long.
SintaxeSyntax
expression.expression. Highlight
expressão Uma variável que representa um objeto 'Find'.expression A variable that represents a 'Find' object.
ComentáriosRemarks
A propriedade Realçar pode retornar ou ser definida como True, False ou wdUndefined.The Highlight property can return or be set to True, False, or wdUndefined. O valor de wdUndefined pode ser usado com o objeto Find para ignorar o estado de realce formatação na seleção ou intervalo que é pesquisado.The wdUndefined value can be used with the Find object to ignore the state of highlight formatting in the selection or range that is searched.
ExemploExample
Este exemplo localiza todas as ocorrências do texto realçado no documento ativo e remove a formatação realçada Configurando a propriedade Realce do objeto Replacement como False.This example finds all instances of highlighted text in the active document and removes the highlight formatting by setting the Highlight property of the Replacement object to False.
Dim rngTemp As Range
Set rngTemp = ActiveDocument.Range(Start:=0, End:=0)
With rngTemp.Find
.ClearFormatting
.Highlight = True
With .Replacement
.ClearFormatting
.Highlight = False
End With
.Execute Replace:=wdReplaceAll, Forward:=True, FindText:="", _
ReplaceWith:="", Format:=True
End With
Confira tambémSee also
Suporte e comentáriosSupport and feedback
Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação?Have questions or feedback about Office VBA or this documentation? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.