自己写了个,但是只能发送第一行的,而且内容是放在”主题”中 请高手帮忙给修改一下,自动向下循环,内容放在邮件正文中.谢谢!
' Select the range of cells on the active worksheet. ActiveSheet.Range("A1:D2").Select ' Show the envelope on the ActiveWorkbook. For I = 4 To 4 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 Set myAttachments = .Item.Attachments While myAttachments.Count > 0 myAttachments.Remove 1 Wend .Introduction = "请餐厅尽快查找差异原因并及时回复.如有问题请与王俊联系! " .Item.To = Range("G" & I).Value .Item.CC = Range("H" & I).Value .Item.Subject = "餐厅差异追踪" .Item.Send End With Next End Sub |