Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Word 中有一个表格,其中有一个包含几行短行的单元格。我想将该单元格的内容复制到一个 .txt 文件中,以维护换行符。
目前换行符丢失:Word表格单元格的内容:
Alice Bob
VBA字符串的内容:
AliceBob
获取字符串的代码示例:
MyString = ActiveDocument.Tables(a).Cell(1, 1).Range.Text
我通过使用复制和粘贴到新的 Word 文档中解决了我的问题,然后将新文档另存为文本文件。不整洁,但对这种情况足够有效。