How can I perform a spell check using Aspose.Words

How can I perform a spell check using Aspose.Words

@david.hancock.imagef,

Thanks for your inquiry.

Please use Run.Font.NoProofing property to check either the formatted characters are set to be spell checked or not. The value of this property is true when the formatted characters are not to be spell checked.

1 Like

Hi

I’m not sure I follow what does Run.Font.NoProofing do?

@david.hancock.imagef,

Thanks for your inquiry. MS Word underlines the spelling errors. To check this formatting, you can use Run.Font.NoProofing property. Could you please share what exact you want to achieve using Aspose.Words? We will then provide you more information on it.

Thanks for the reply

Basically we have a word document, which we want to spell check using Aspose and not spell checked in word

By spell check, identify a word which may be miss spelt and automatically update it with the best match
(no human or UI interaction)

From your reply earlier I assume there’s no spell check engine in Aspose?

If there is no spell check, how can I easily, quick and efficiently iterate though all the words in a document and update the current word is needed

Thanks

@david.hancock.imagef,

Thanks for your inquiry. Aspose.Words does not provide API to identify a word and fix its spelling. Please note that Aspose.Words for .NET is a class library that enables your applications to perform a great range of document processing tasks. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word®.

Thanks for the reply, ignoring the fact that Aspose.Words have not API for spell checking

How can I easily, quick and efficiently iterate though all the words in a document and update the current word if needed

@david.hancock.imagef,

Thanks for your inquiry. Please note that all text of the document is stored in runs of text.The Run node may contains a single letter, multiple letters or whole paragraph’s text. You can iterate through Run nodes of document using following code example.

Document doc = new Document(MyDir + "input.docx"); 
                 
foreach (Run irun in doc.GetChildNodes(NodeType.Run, true))
{
    
}