返回列表 上一主題 發帖

[發問] mailenvelope寄邮件

[發問] mailenvelope寄邮件

请问知不知道mailenvelope寄邮件可不可以加附件?
lmh

回復 2# jackyq
以下code可以加附件,而且能順利寄出:
Sub test5()
    Application.DisplayAlerts = False
    [a2:d5].Select
    ActiveWorkbook.EnvelopeVisible = True
    With ActiveSheet.MailEnvelope
        .Introduction = "abcd"
        .Item.To = "[email protected]"
        .Item.Subject = "efgh"
        .Item.Attachments.Add ThisWorkbook.Path & "/abc.xls"
'        .Item.display
        .Item.Send
    End With
    'begin closing the allocation file and save it
    ' Windows(Allocfile).Activate
    Application.DisplayAlerts = True
End Sub
但問題是,每寄一次,附件abc.xls會累加,寄第五次,abc.xls就有5個.我想一定有辦法清除原來的附件.但不知道如何做.
為什麼用mailenvilope,因為它快,寄40封4秒!(不帶附件的)
lmh

TOP

        靜思自在 : 欣賞別人就是莊嚴自己。
返回列表 上一主題