Solved

non-Dictionary word

Posted on 2014-10-16
1
95 Views
Last Modified: 2014-10-31
Hi,

could you please help me the bellow questions......

How to get non-dictionary word from a word document programmatically?

and check the string is dictionary word or non-dictionary word ?
0
Comment
Question by:mannevenu26
1 Comment
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40386177
Hi,

pls try

using System;
using Word =  Microsoft.Office.Interop.Word;

class Program
{
    static void Main()
    {



        int myErrors = 0;
        // Open a doc file.
        object oMissing = System.Reflection.Missing.Value;
        Word.Application application = new Word.Application();

        application.Visible = true;
        Word.Document document = application.Documents.Open("c:\\YourFile.docx");

        foreach (Word.Range wd in document.Words)
        {
            myErrors = wd.SpellingErrors.Count;
            if (myErrors > 0)
            {
                Console.WriteLine("{0} is not in the spelling Dic ", wd.Text);
            }

        }

        application.Quit();
    }
}

Open in new window

Regards
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question