Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A1:B5").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "E-Mail_Address_Here"
.Item.Subject = "My subject"
.Item.Send
End With
End Sub
1 回答
quick google搜索会有很长的路要走 .
见:How to send a range of cells in an e-mail message by using Visual Basic for Applications in Excel
这是相关的VBA代码 .
对于您的特定情况,您将必须修改上面的代码以选择4个工作表中的每一个的所有单元格 - 循环中的
"Assembly"
"Lam"
"Finish"
和"MV"
并将其粘贴到电子邮件正文中 .