Solved

non-Dictionary word

Posted on 2014-10-16
1
93 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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