Sub ex()
Set xlOut = CreateObject("Outlook.Application")
'將寄出範圍命名為Rng,取得Rng所有文字
For i = 1 To [Rng].Rows.Count
For j = 1 To [Rng].Columns.Count
s = IIf(s = "", [Rng].Cells(i, j), s & Chr(9) & [Rng].Cells(i, j))
Next
mystr = IIf(mystr = "", s, mystr & Chr(10) & s)
s = ""
Next
With xlOut
Set Mymail = .CreateItem(olMailItem)
With Mymail
.Subject = "Mail send test" '信件主旨
.Recipients.Add "收件者@hotmail.com" '收件者mailaddress
.Body = mystr '以Rng內容為內文
.Send '寄出信件
End With
End With
End Sub
的確是可以把Excel的指定範圍帶進Outlook,但格式全部沒有了,
應該怎麼改才可以把字型大小顏色等保存呢?