vba - MS Word 代码的 Visual Basic 不适用于日语
问题描述
解决方案
至少有一个错误是 GrammaticalError,而不是 SpellingError。
您可以以与已有代码类似的方式循环浏览 GrammaticalErrors,但没有与 GetSpellingErrors 方法等效的方法。
例如你可以做
For Each Rng in ActiveDocument.Range.GrammaticalErrors
' Each GrammaticalError is just a Word Range,
' It is not obvious exactly what the range "covers". Judging from your example
' the range "covers" the sentence.
' So do whatever you need here. This example just highlights each Rng
Rng.HighlightColorIndex = wdYellow
End
Word 对象模型中只有两种类型的 ProofreadingError - wdGrammaticalError 和 wdSpellingError。
推荐阅读
- java - Eclipse不会显示类的行
- jquery - jQuery 中可以包含哪些选择器
- xml - 如何为同一文本文件中具有不同键值的数据获取正确的关联 xml 标记名称
- php - 致命错误:未捕获的错误:调用未定义的函数
- cakephp - 如何在控制器 cakephp 1.3 中获取视图 html
- r - 基于多个变量重新编码单个变量
- solr - apache solr 配置 - 如何在 VCS 中保留配置,但在机器上保留数据
- navigation - 我可以使用导航自定义模式吗?
- ios - ld: 找不到 -lDoubleConversion React Native 0.59 的库
- html - Safari 中的锚链接...?