I have a script that sends emails out every Monday. How would I update the below so that the email doesn’t send unless it’s the first mMonday of the month.
.CreateReports
.CreateNewEmail keyName '"Email Subject"
With .LastEmail
.AddTo "email.recipient"
End With
.SendEmails
.SetScriptRunSuccess True
I have this below line that sends out an extra email on Sunday, but would like to change it that it prevents emails being sent out unless it’s the first Monday of the month:
= (WeekdayName(Weekday(checkDate), True) = "Sun")
3
First MONDAY will be in 7days obviously, so add condition
- check if its monday
- check weekday is <=7
2