我想知道如何在MS WORD中给错误的词下划线

I wonder how to underline the wrong words in MS WORD

我想知道如何在MS WORD中给错误的词下划线。 我认为我们应该使用 vsto 和 XML。 如果您有要下划线的示例来源,请告诉我。

在 VBA 中,您可以使用:

Dim Rng As Range
For Each Rng In ActiveDocument.Range.SpellingErrors
  Rng.Font.Underline = wdUnderlineSingle
  Rng.Font.UnderlineColor = wdColorRed
Next

我会留给你做任何改编。