Sorry the EmailDataSource file that the mail merge creates. I figured out why the extra rows were being generated and why the endless loop. The Excel file somehow got corrupted and had thousands of blank rows that the merge was reading as actual data. I created a new file and that issue disappeared.
So I am able to run the file without changing anything except that the email would be in HTML format and the subject, as seen below. I wanted to see it run before I changed the timing. It ran but it never generated emails to my Outlook account. It does nothing but create the EmailDataSource file and the macro ends. I verified that the code read exactly the same and the file is created successfully.
.MailSubject = "Terminate"
.MailFormat = wdMailFormatHTML
'.MailFormat = wdMailFormatPlainText
Most importantly, thank you so much for helping me with this.
|