在 MS Word 表中插入换行符
我正在尝试在表格单元格中插入换行符。到目前为止,我一直在尝试操纵单元格的范围,但要么出现错误,要么导致我的文本进入后续行或表格之外。
如何在表格单元格中插入换行符?
(使用宏,显然有一种方法可以通过选择来做到这一点,但如果可能的话我宁愿避免这种情况)
(我拥有的东西不起作用:range.InsertParagrah,range.InsertParagraphAfter,range.Text =“\r \n", range.InsertBreak(wdLineBreak))
I'm trying to insert a line break into a table cell. So far I've been trying to manipulate the range of the cell, but am either getting errors or causing my text to go into subsequent rows or outside of the table.
How would I insert a line break into a table cell?
(Using macros, there is apparently a way to do it with Selection, but I'd rather avoid that if possible)
(Things I have that don't work: range.InsertParagrah, range.InsertParagraphAfter, range.Text = "\r\n", range.InsertBreak(wdLineBreak))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 shift + enter - 我认为这可以解决问题。
Try shift + enter - I think that does the trick.
这适用于 Word 2010,您需要选择正确的单元格等:
/edit/
这样怎么样?请原谅使用选择来获取范围,我知道您不喜欢它,但这是我测试的最快方法。您可以使用自己的方式来获取范围。
This works in Word 2010, you'll need to have the correct cell etc. selected:
/edit/
How about this? Forgive the use of Selection to get the range, I know you don't like it but it was the quickest way for me to test. You can use your own way to get the range.