See makro saadab iga lehe ühele inimesele.
- Looge lehega uus töövihik.
- Salvestage töövihik enne selle saatmist
- Pärast saatmist kustutage fail kõvakettalt.
Sub Mail_every_Worksheet () Dim strDate Stringina Dim sh tööleherakendusena.ScreenUpdating = False For this shorkbook.Worksheets If sh.Range ("a1"). Value like "*@*" then sh.Copy strDate = Format (Date , "dd-mm-yy") & "" & Format (Time, "h-mm-ss") ActiveWorkbook.SaveAs "Osa" & ThisWorkbook.Name _ & "" & strDate & ".xls" ActiveWorkbook.SendMail ActiveSheet.Range ("a1"). Väärtus, _ "See on teemarea" ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook.FullName ActiveWorkbook.Close False End If Next sh Application.ScreenUpdating = True End Sub