忽略DocX文件中的拼写错误 [英] Ignore spelling error in DocX file
问题描述
使用OpenXML,我将一些文本插入到我知道会被标记为拼写错误的文档中(因为它是产品名称),并且在Word中打开文件时,该文本将带有恼人的红线/波浪状标记.如何标记XML,以便知道该单词的拼写正确?
Using OpenXML, I'm inserting some text into a document that I know will be marked as incorrectly spelled (because it's a product name) and will be marked with the angry red line/squiggly when the file is opened in Word. How can I mark the XML so that it knows that the spelling is correct for that word?
我尝试弄乱 ProofError ,将其放置在与我的段落和跑步相关的不同位置,并使用不同的类型值,但无法找出是否有办法使用它将某物标记为不是错误.
I've tried messing around with ProofError, putting it in various places with relation to my paragraph and my run and with different values for type, but can't figure out if there's a way to use that to mark something as not an error.
推荐答案
ProofError
实际上是用红线标记文本.要在进行拼写/语法检查的过程中排除文本,请使用noProof
.
ProofError
is to actually mark the text run with the angry red line. To exclude the text in a run for spell/ grammar checks use noProof
.
让我们说说一个字:
<w:p>
<w:r>
<w:t>Cfgcfgcyhgjguih</w:t>
</w:r>
</w:p>
在下面的运行属性中,您可以告诉单词client的拼写/语法检查引擎忽略该单词进行检查
You can tell the spell/grammar checking engine of the word client to ignore this word for checks, in the run properties as below
<w:p>
<w:rPr>
<w:noProof w:val="true"/>
</w:rPr>
<w:r>
<w:t>Cfgcfgcyhgjguih</w:t>
</w:r>
</w:p>
您也可以全局禁用拼写/语法检查引擎,以停止在文档中查找错误,方法是在文档的settings
部分中将其指定为:
You can also globally disable the spell/grammar checking engine to stop looking for errors in a document by specifying so in the documents settings
part as:
<w:proofState w:spelling="clean" w:grammar="clean"/>
以上内容可防止客户进行拼写/语法检查,直到下次对文档进行编辑为止.
The above prevents the client's spell/grammar checking to kick-in until the next edit made to the document.
希望这会有所帮助.
这篇关于忽略DocX文件中的拼写错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!