Ta makro bo poslal vsak list eni osebi.
- Ustvarite nov delovni zvezek s preglednico.
- Delovni zvezek shranite, preden ga pošljete po pošti
- Po pošiljanju izbrišite datoteko s trdega diska.
Sub Mail_every_Worksheet () Dim strDate As String Dim sh As Worksheet Application.ScreenUpdating = False Za vsak sh v ThisWorkbook.Worksheets Če je sh.Range ("a1"). Vrednost kot "*@*" Potem sh.Copy strDate = Format (Datum , "dd-mm-yy") & "" & Format (Time, "h-mm-ss") ActiveWorkbook.SaveAs "Del" & ThisWorkbook.Name _ & "" & strDate & ".xls" ActiveWorkbook.SendMail ActiveSheet.Range ("a1"). Vrednost, _ "To je vrstica Zadeva" ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook.FullName ActiveWorkbook.Close False End If Next sh Application.ScreenUpdating = True End Sub