请问在某个路径下的附件怎么加上去, 还有就是发送过程中, 提示信息无法去掉.请高手帮忙填加代码!
x1hJ9lbi.rar
(10.59 KB, 下载次数: 109)
Private Sub CommandButton1_Click() Application.DisplayAlerts = False On Error Resume Next Dim rowCount, endRowNo Dim objOutlook As New Outlook.Application Dim objMail As MailItem endRowNo = Range("A65536").End(xlUp).Row Set objOutlook = New Outlook.Application For rowCount = 7 To endRowNo Set objMail = objOutlook.CreateItem(olMailItem) With objMail .To = Cells(rowCount, 4) .Subject = Cells(2, 3) .Body = Cells(3, 3) .Attachment.Add Cells(4, 3) .Send End With Set objMail = Nothing Next Set objOutlook = Nothing MsgBox endRowNo - 6 & " " & "mails sent successfully!" Application.DisplayAlerts = True End Sub
[此贴子已经被作者于2006-11-15 0:52:40编辑过] |