Page Rank

Subscribe

Categories

Recent posts

Alexa Rank

How to spell check in C#


  • This topic explains about, how to spell check text in TextBox or RichTextBox  in C# programming.
  • To spell check requires a reference to the Word object model.
  • How to add Word Object model to your application: Select Project/Add Reference. Click the COM tab and select “Microsoft Word 12.0 Object Library” (or whatever version you have on your system).
  • You have to add a Namespace to your application to spell check in C#:

  • Tools required creating Spell Check: Button1 (Button1), TextBox1 (TextBox1)

How to spell check in C#Working

  • When you click the Spell Check button (Button1), the program creates a Word.Application object and sets its visible property to False.

  • It uses that object’s Documents.Add method to create a new Document object.
  • It gets a Range object representing the Document’s text and copies the text from TextBox1 into the Document.
  • Next the program activates the Document and calls its Check Spelling method.
  • When Check Spelling returns, the program copies the result back into TextBox1, removing any leading and trailing carriage returns and line feeds that Word added.
  • Finally it closes the Document, telling it not to save the new text, and closes the Word server.

How to spell check in C#Complete Code

How to spell check in vb - Final Result

How to spell check in C# – Final Result

If you have any suggestions or doubts regarding spell check, please contact us…

 How to spell check in C#


VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">