[英]extract text in rich text format from range
How can I extract the RTF content from the Range (Microsoft.Interop.Word.Range class) of word document?如何从 Word 文档的 Range(Microsoft.Interop.Word.Range 类)中提取 RTF 内容? Range has property named "Text" but it returns the plain text and not the RTF Text.
Range 具有名为“Text”的属性,但它返回纯文本而不是 RTF 文本。 So how I can get the RTF text from Range?
那么如何从 Range 中获取 RTF 文本呢?
Word's native format is not RTF - a conversion is necessary to get Word Open XML (or binary) content as RTF. Word 的本机格式不是 RTF - 需要进行转换才能将 Word Open XML(或二进制)内容作为 RTF。 That means there are three possibilities:
这意味着存在三种可能性:
Range.WordOpenXML
to a string, then run that through the conversion tool.Range.WordOpenXML
将 Word Open XML 提取为字符串,然后通过转换工具运行该字符串。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.