Solved

non-Dictionary word

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

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now