Edit

Share via


Find.HitHighlight Method

Definition

Highlights all found matches and returns a Boolean that represents whether matches were found.

public bool HitHighlight (ref object FindText, ref object HighlightColor, ref object TextColor, ref object MatchCase, ref object MatchWholeWord, ref object MatchPrefix, ref object MatchSuffix, ref object MatchPhrase, ref object MatchWildcards, ref object MatchSoundsLike, ref object MatchAllWordForms, ref object MatchByte, ref object MatchFuzzy, ref object MatchKashida, ref object MatchDiacritics, ref object MatchAlefHamza, ref object MatchControl, ref object IgnoreSpace, ref object IgnorePunct, ref object HanjaPhoneticHangul);
abstract member HitHighlight : obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj -> bool
Public Function HitHighlight (ByRef FindText As Object, Optional ByRef HighlightColor As Object, Optional ByRef TextColor As Object, Optional ByRef MatchCase As Object, Optional ByRef MatchWholeWord As Object, Optional ByRef MatchPrefix As Object, Optional ByRef MatchSuffix As Object, Optional ByRef MatchPhrase As Object, Optional ByRef MatchWildcards As Object, Optional ByRef MatchSoundsLike As Object, Optional ByRef MatchAllWordForms As Object, Optional ByRef MatchByte As Object, Optional ByRef MatchFuzzy As Object, Optional ByRef MatchKashida As Object, Optional ByRef MatchDiacritics As Object, Optional ByRef MatchAlefHamza As Object, Optional ByRef MatchControl As Object, Optional ByRef IgnoreSpace As Object, Optional ByRef IgnorePunct As Object, Optional ByRef HanjaPhoneticHangul As Object) As Boolean

Parameters

FindText
Object

Specifies the text to find. Use an empty string ("") to search for formatting only. You can search for special characters by specifying appropriate character codes. For example, "^p" corresponds to a paragraph mark and "^t" corresponds to a tab character.

HighlightColor
Object

Specifies the highlight color for the text. Can be any RGB color or one of the WdColor enumeration values.

TextColor
Object

Specifies the color of the text. Can be any RGB color or one of the WdColor enumeration values.

MatchCase
Object

True to specify that the find text be case-sensitive. Corresponds to the Match case check box in the Find and Replace dialog box.

MatchWholeWord
Object

True to have the find operation locate only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box.

MatchPrefix
Object

True to match words beginning with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box.

MatchSuffix
Object

True to match words ending with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box.

MatchPhrase
Object

True ignores all white space and control characters between words.

MatchWildcards
Object

True to have the find text be a special search operator. Corresponds to the Use wildcards check box in the Find and Replace dialog box.

MatchSoundsLike
Object

True to have the find operation locate words that sound similar to the find text. Corresponds to the Sounds like check box in the Find and Replace dialog box.

MatchAllWordForms
Object

True to have the find operation locate all forms of the find text (for example, "sit" locates "sitting" and "sat"). Corresponds to the Find all word forms check box in the Find and Replace dialog box.

MatchByte
Object

True to distinguish between full-width and half-width letters or characters during a search.

MatchFuzzy
Object

True to use the nonspecific search options for Japanese text during a search. Read/write.

MatchKashida
Object

True if find operations match text with matching kashidas in an Arabic-language document. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

MatchDiacritics
Object

True if find operations match text with matching diacritics in a right-to-left language document. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

MatchAlefHamza
Object

True if find operations match text with matching alef hamzas in an Arabic-language document. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

MatchControl
Object

True if find operations match text with matching bidirectional control characters in a right-to-left language document. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

IgnoreSpace
Object

True ignores all white space between words. Corresponds to the Ignore white-space characters check box in the Find and Replace dialog box.

IgnorePunct
Object

True ignores all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box.

HanjaPhoneticHangul
Object

True ignores phonetic hangul and hanja characters. Available only if you have support for Korean languages.

Returns

Boolean

Remarks

The HitHighlight method applies primarily to search highlighting in Microsoft Office Outlook when Microsoft Office Word is specified as the e-mail editor. However, you can use this method on documents inside Word if you want to highlight found text. Otherwise, use the Execute(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) method.

Applies to