
Sub Invioemail()
EmailAddr = Cells(Range("O97").Value, "AB").Value
Allegato = Cells(Range("O97").Value, "AA").Value
Subj = Range("AI95").Value
ActiveSheet.Range("AI100:AU149").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = ""
.Item.To = EmailAddr
.Item.CC = ""
.Item.BCC = ""
.Item.Subject = Subj
.Item.Attachments.Add Allegato
.Item.Send
End With
End Sub
--------------------------------------------------------------
Sub InviaAll()
For I = 100 To Cells(Rows.Count, "O").End(xlUp).Row
Range("O97") = I
Call Invioemail
Next I
End Sub
|
| scossa's web site |
| Se tu hai una mela, ed io ho una mela, e ce le scambiamo, allora tu ed io abbiamo sempre una mela per uno. Ma se tu hai un'idea, ed io ho un'idea, e ce le scambiamo, allora abbiamo entrambi due idee. (George Bernard Shaw) |
With ActiveSheet.MailEnvelope
nAttchs = .Item.attachments.Count '<- aggiunta
For j = 1 To nAttchs '<- aggiunta
.Item.attachments(j).Delete '<- aggiunta
Next '<- aggiunta
.Item.attachments.Add Allegato
|
