我正在尝试使用 c# api 以不同语言使用 MS Office 进行拼写检查。我已经安装了所有相关的语言包。例如,如果我输入德语拼写错误的单词“buxs”,我会得到英文建议:bus、buss、buds、boxes、bugs、bums、buys、box's、buns、burs。但我期待这样的建议:Bus、büxt、bis、büxe、Bugs、Buhs。
我的代码在下面......我做错了什么?
wordApp = new Application();
wordApp.Visible = true;
WdLanguageID language = WdLanguageID.wdGerman;
wordDocument = wordApp.Documents.Add(ref missing, ref missing, ref missing, ref missing);
wordDocument.Content.LanguageID = language;
// This is mis-spelled.
string misSpelledWord = "buxs";
// this returns english suggestions...
SpellingSuggestions theSuggestions = wordApp.GetSpellingSuggestions( misSpelledWord, ref missing, ref missing, ref missing, ref suggestionMode, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);