Microsoft Word Options On

The search options are a collection of boolean values defining how the search parameter should be treated. Gets or sets a value indicating whether to ignore all punctuation characters between words. Corresponds to the 'Ignore punctuation characters' check box in the Find and Replace dialog box. Stay a step ahead with the latest AI-powered apps: Create inspiring documents with smart assistance features in Word, Excel & PowerPoint Save up to 500,000 photos. & files with 1 TB of OneDrive cloud storage (.assumes 2MB file size) Enjoy an ad-free email and calendar experience with Outlook. If you use the Word Options menu on a regular basis, it saves time if you add it to the Quick Access toolbar. Just follow these steps: Click the Office Button. Right-click the Word Options button. Select Add to Quick Access Toolbar. Now you don’t have to click the Office Button every time you want to change your preferences.

-->

Add-ins frequently need to act based on the text of a document.A search function is exposed by every content control (this includes Body, Paragraph, Range, Table, TableRow, and the base ContentControl object). This function takes in a string (or wildcard expression) representing the text you are searching for and a SearchOptions object. It returns a collection of ranges which match the search text.

Search options

The search options are a collection of boolean values defining how the search parameter should be treated.

PropertyDescription
ignorePunctGets or sets a value indicating whether to ignore all punctuation characters between words. Corresponds to the 'Ignore punctuation characters' check box in the Find and Replace dialog box.
ignoreSpaceGets or sets a value indicating whether to ignore all whitespace between words. Corresponds to the 'Ignore white-space characters' check box in the Find and Replace dialog box.
matchCaseGets or sets a value indicating whether to perform a case sensitive search. Corresponds to the 'Match case' check box in the Find and Replace dialog box.
matchPrefixGets or sets a value indicating whether to match words that begin with the search string. Corresponds to the 'Match prefix' check box in the Find and Replace dialog box.
matchSuffixGets or sets a value indicating whether to match words that end with the search string. Corresponds to the 'Match suffix' check box in the Find and Replace dialog box.
matchWholeWordGets or sets a value indicating whether to find operation 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.
matchWildcardsGets or sets a value indicating whether the search will be performed using special search operators. Corresponds to the 'Use wildcards' check box in the Find and Replace dialog box.

Wildcard guidance

The following table provides guidance around the Word JavaScript API's search wildcards.

To find:WildcardSample
Any single character?s?t finds sat and set.
Any string of characters*s*d finds sad and started.
The beginning of a word<<(inter) finds interesting and intercept, but not splintered.
The end of a word>(in)> finds in and within, but not interesting.
One of the specified characters[ ]w[io]n finds win and won.
Any single character in this range[-][r-t]ight finds right and sight. Ranges must be in ascending order.
Any single character except the characters in the range inside the brackets[!x-z]t[!a-m]ck finds tock and tuck, but not tack or tick.
Exactly n occurrences of the previous character or expression{n}fe{2}d finds feed but not fed.
At least n occurrences of the previous character or expression{n,}fe{1,}d finds fed and feed.
From n to m occurrences of the previous character or expression{n,m}10{1,3} finds 10, 100, and 1000.
One or more occurrences of the previous character or expression@lo@t finds lot and loot.

Escaping the special characters

Wildcard search is essentially the same as searching on a regular expression. There are special characters in regular expressions, including '[', ']', '(', ')', '{', '}', '*', '?', '<', '>', '!', and '@'. If one of these characters is part of the literal string the code is searching for, then it needs to be escaped, so that Word knows it should be treated literally and not as part of the logic of the regular expression. To escape a character in the Word UI search, you would precede it with a ' character, but to escape it programmatically, put it between '[]' characters. For example, '[*]*' searches for any string that begins with a '*' followed by any number of other characters.

Examples

The following examples demonstrate common scenarios.

Ignore punctuation search

Search based on a prefix

Search based on a suffix

Search using a wildcard

More information can be found in the Word JavaScript Reference API.

There are plenty of additional settings found in Word’s Options window that change how it works. If some of Word's default behavior doesn't quite work for you, changing one of these settings may help.

Customize Word Options

  1. Click the File tab.
  2. Select Options.

    The first tab in the Options window is General options. It contains some basic settings, such as the Mini Toolbar, your name and initials, and the theme and background of the window.

    The other tabs control different sets of options:

    • Display controls how content appears on the screen, whether any formatting marks appear, and how the document prints.
    • Proofing controls spelling and grammar check, as well as autocorrect.
    • Save controls default file types and saving locations.
    • Language controls the languages used for display and editing purposes.
    • Advanced controls a variety of options that don't have a home elsewhere.
  3. Click a tab in the Options window.

The Options window displays the options available for the selected tab.

Customize the Ribbon

The Options window is also where you can customize what ribbon tabs appear, what commands appear on the ribbon, and what commands appear on the Quick Access Toolbar.

Microsoft Word Options On
  1. In the Word Options window, click the Customize Ribbon tab.

    The column on the left displays commands that you can add to or remove from the ribbon, while the column on the right shows the available ribbon tabs and groups.

    The ribbon tabs can be toggled with the check box next to each one or expanded to show the groups and command buttons.

  2. Select and expand a ribbon tab.

    You cannot customize the commands that appear in a default ribbon group; however, you can add commands to custom groups you create yourself.

  3. Select a custom group, or add a new one by clicking the New Group button.
  4. Select a command from the left column.
  5. Click the Add button.

Microsoft Word Alternatives For Free

The command is added to the ribbon group.

Word

You can also remove commands from the ribbon by selecting them in the right column and clicking Remove.

Customize the Quick Access Toolbar

You can customize the Quick Access Toolbar from the Options window as well, controlling which commands are available there.

  1. In the Word Options window, click the Quick Access Toolbar tab.

    The column on the left displays commands that you can add to the Quick Access Toolbar, while the column on the right shows the commands that are already there.

  2. Select a command from the left column.
  3. Click the Add button.

The command is added to the Quick Access Toolbar.

You can remove a command from the Quick Access Toolbar by selecting it in the right column, then clicking the Remove button.

You can also reorder the commands by selecting one in the right column, and then clicking the Up or Down arrow buttons to move it up or down in the order.

Change the Default Font

You can also customize the default font that is used when you start a new document.

Word
  1. Start in a new, blank document.
  2. Click the Font group’s dialog box launcher.
  3. Customize how you want the default font to appear.

    You can customize the font, as well as the style, size, and effects.

  4. Click the Set As Default button.

    You can choose to change the default for just the current document, or for all documents based on this document’s template in the future.

  5. Choose All documents based on the Normal template.
  6. Click OK.

Microsoft Word Options On Desktop

The default font is changed for the current document and any newly-created documents.