开发者

larger text than cell width

开发者 https://www.devze.com 2023-02-21 22:11 出处:网络
I\'m copying a piece of text from Excel to Word using: Range(\"A1:C37\").Copy appWD.Selection.PasteExcelTable LinkedToExcel:=False, WordFormatting:=False, RTF:=True

I'm copying a piece of text from Excel to Word using:

Range("A1:C37").Copy
appWD.Selection.PasteExcelTable LinkedToExcel:=False, WordFormatting:=False, RTF:=True

The trouble is some cells contain text which is longer than the cell width. In Excel when I align right the text just continues into the other column. Trouble is, when copied into Word it automatically wraps text together. Is there a way of tur开发者_如何学编程ning this off or a way around this so my text stays on the same line?


You want to merge cells. You may or may not know this already, but merging is done like this:

Selection.Cells.Merge

Warning: merged cells can be a pain to format afterwards, especially if you want to insert or remove columns.

0

精彩评论

暂无评论...
验证码 换一张
取 消