Expand Minimize
This topic has not yet been rated - Rate this topic

Bookmark.GetSpellingSuggestions Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets a SpellingSuggestions collection that represents the words suggested as spelling replacements for the first word in the Bookmark control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
SpellingSuggestions GetSpellingSuggestions(
	ref Object CustomDictionary,
	ref Object IgnoreUppercase,
	ref Object MainDictionary,
	ref Object SuggestionMode,
	ref Object CustomDictionary2,
	ref Object CustomDictionary3,
	ref Object CustomDictionary4,
	ref Object CustomDictionary5,
	ref Object CustomDictionary6,
	ref Object CustomDictionary7,
	ref Object CustomDictionary8,
	ref Object CustomDictionary9,
	ref Object CustomDictionary10
)

Parameters

CustomDictionary
Type: System.Object

Either an expression that returns a Dictionary or the file name of the custom dictionary.

IgnoreUppercase
Type: System.Object

true to ignore words in all uppercase letters. If this argument is omitted, the current value of the IgnoreUppercase property is used.

MainDictionary
Type: System.Object

Either an expression that returns a Dictionary or the file name of the main dictionary. If you do not specify a main dictionary, Microsoft Office Word uses the main dictionary that corresponds to the language formatting of the first word in the Bookmark control.

SuggestionMode
Type: System.Object

Specifies the way Word makes spelling suggestions. Can be one of the following WdSpellingWordType constants: wdAnagram, wdSpellword, or wdWildcard. The default value is wdSpellword.

CustomDictionary2
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary3
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary4
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary5
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary6
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary7
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary8
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary9
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

CustomDictionary10
Type: System.Object

Either an expression that returns a Dictionary or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example adds a Bookmark control with misspelled text to the first paragraph and then displays the first spelling suggestion in a message box.

This example is for a document-level customization.

private void BookmarkGetSpellingSuggestions()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "missspeling.";

    object IgnoreUppercase = true;
    object SuggestionMode = Word.WdSpellingWordType.wdSpellword;

    Word.SpellingSuggestions suggestions =
        bookmark1.GetSpellingSuggestions(ref missing, ref IgnoreUppercase,
        ref missing, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing);

    MessageBox.Show("The first suggestion is: " +
        suggestions[1].Name);
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.