NamedRange.CheckSpelling Method (2007 System)
Checks the spelling of text in the NamedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Function CheckSpelling ( _
CustomDictionary As Object, _
IgnoreUppercase As Object, _
AlwaysSuggest As Object, _
SpellLang As Object _
) As Object
'Usage
Dim instance As NamedRange
Dim CustomDictionary As Object
Dim IgnoreUppercase As Object
Dim AlwaysSuggest As Object
Dim SpellLang As Object
Dim returnValue As Object
returnValue = instance.CheckSpelling(CustomDictionary, _
IgnoreUppercase, AlwaysSuggest, _
SpellLang)
public Object CheckSpelling(
Object CustomDictionary,
Object IgnoreUppercase,
Object AlwaysSuggest,
Object SpellLang
)
public:
Object^ CheckSpelling(
Object^ CustomDictionary,
Object^ IgnoreUppercase,
Object^ AlwaysSuggest,
Object^ SpellLang
)
public function CheckSpelling(
CustomDictionary : Object,
IgnoreUppercase : Object,
AlwaysSuggest : Object,
SpellLang : Object
) : Object
Parameters
CustomDictionary
Type: System.ObjectIndicates the file name of the custom dictionary to be examined if the word is not found in the main dictionary. If this argument is omitted, the currently specified dictionary is used.
IgnoreUppercase
Type: System.Objecttrue to have Microsoft Office Excel ignore words that are all uppercase; false to have Excel check words that are all uppercase. If this argument is omitted, the current setting is used.
AlwaysSuggest
Type: System.Objecttrue to have Excel display a list of suggested alternate spellings when an incorrect spelling is found; false to have Excel pause while you input the correct spelling. If this argument is omitted, the current setting is used.
SpellLang
Type: System.ObjectThe language of the dictionary being used. Can be one of the MsoLanguageID values used by the LanguageID(MsoAppLanguageID) property.
Return Value
Type: System.Object
Remarks
This form has no return value; Excel displays the Spelling dialog box.
Optional Parameters
For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.
Examples
The following code example uses the CheckSpelling method to check the spelling of the string "Mongeese".
This example is for a document-level customization.
Private Sub CheckRangeSpelling()
Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
= Me.Controls.AddNamedRange(Me.Range("A1"), _
"namedRange1")
namedRange1.Value2 = "Mongeese"
namedRange1.CheckSpelling(, True, True, _
Office.MsoLanguageID.msoLanguageIDEnglishUS)
End Sub
private void CheckRangeSpelling()
{
Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
this.Controls.AddNamedRange(this.Range["A1", missing],
"namedRange1");
namedRange1.Value2 = "Mongeese";
namedRange1.CheckSpelling(missing, true, true,
Office.MsoLanguageID.msoLanguageIDEnglishUS);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.