|
本帖最后由 sunw1984 于 2018-7-18 10:49 编辑
各位老师
本人现做好一个表,表填完后点保存后需要实现”将Sheet1.Range("A1:J28")的内容复制粘贴到Outlook正文(非附件形式,如图片/表格形式)”并发送,特此请教代码怎么写,非常感谢
- Sheet1.Range("A1:J28").Select
-
- Dim OutlookApp As Object
- Dim MailItem As Object
- Dim Recipient As Object
- Set OutlookApp = CreateObject("Outlook.Application")
- Set MailItem = OutlookApp.CreateItem(0)
- MailItem.to = "wei.sum@cabotcorp.com"
- MailItem.Subject = "检查记录" & Sheets("sheet1").Range("J28").Value
- MailItem.Body = 这里该怎么写啊
- ThisWorkbook.Save
- MailItem.display
- 'MailItem.Attachments.Add (ThisWorkbook.FullName)
- Set OutlookApp = Nothing
- Set MailItem = Nothing
- Set Recipient = Nothing
- Application.DisplayAlerts = True
- Application.Calculation = xlCalculationAutomatic
- Application.ScreenUpdating = True
复制代码
|
|