Change Word's language Word Dictionary
See you last weekend.onAltarIt has been suggested that there is no way to useCodeChangeWord'slanguageWord dictionary,becauseto beTacitrecognizeof thelanguagewords will affectnowwithlanguagewords are enteredSpellWriteDeviceand other schoolstheTools. I checked it out on the Internet.nowSpire.docitaProductionProductssayitoursupport, exactlyFree tono matterso I'm using Spainlanguagedid it onceTest,KnotFruit HairnoweffectstillNowrong,let's share the followinghave testedProcess.
WholeeverProcessUseC #languagewords, inVS2012Ringunder the border,The version that Word uses is word2013, which isTestof thelanguagewords areSpanish in Peru,Locale ID Values are 10250. Full-Locale ID Values table, as you can seeMicrosoft Locale ID Values.
look at the third-party library of functions here:http://www.e-iceblue.com/Download/download-word-for-net-now.html, the version used is free Spire.doc for. NET version:5.2
The useful files that are needed are Spire.Doc.dll, placed in the downloaded extracted bin directory under the NET4.0 (you can choose different versions according to their needs).
Here's the official start!
First step: Add DLL file into project.
Open Our vs New Console program is enough, then right-reference->add reference then add Spire.Doc.dll file according to the.
Step Two: Add using . You need to add the following three manually.
usingSpire.doc;
usingSpire.Doc.Documents;
usingSpire.Doc.Fields;
Step Three: Establish new Word file, and initialize it. At the beginning of this step is adding code.
Document document =NewDocument ();
Section sec = document. AddSection ();
Paragraph para = sec. Addparagraph ();
Fourth step: In the created paragraph, add TextRange , and added a Spanish language.
TextRange Txtrange = para. AppendText ("corrige según Diccionario en volunteered");
TxtRange.CharacterFormat.LocaleIdASCII =10250;
Fifth step: Save the file and preview it.
Document. SaveToFile ("Result.docx", fileformat.docx2013);
System.Diagnostics.Process.Start ("Result.docx");
Preview results
As you can see, the language dictionary has been changed to the default language without notice . Peru Spanish up.
Change the language dictionary of Word