希望你能帮我解决这个问题。
我有一个捕获cell.value并将其带到outlook.body的宏,但是单元格的值已经直接从word复制,因此有些行不会按预期被破坏。
例如,从word文档中获取的值为:
"Hello xxx
I've been waiting for the files that you said you were going to sent
Don't forget our meeting this week.
See you
Leonardo."
但是当这个值发送到outlook.body时,会删除换行符:
"Hello xxx I've been waiting for the files that you said you were going to sent Don't forget our meeting this week. See you Leonardo."
我该怎么办?
答案 0 :(得分:1)
Excel使用LF来破坏单元格中的一条线。 Outlook使用CR LF打破一条线。
尝试:
OutlookValue = Replace(ExcelValue, vbLF, vbCR & vbLF)