I have some VBA script to open an Outlook email template file, populate 'To' field from the database, open MsgBox requesting Yes or No to send current message.
If YES message is sent, If NO message is not sent and TO field is made blank, ready to be filled from next record.
If the final email is NOT sent, the mail message is left open and needs to be closed manually.
My question is - can I close it from the VBA script?
I know I can close the Outlook application via VBA, but want to leave Outlook open, only close the last mail item that has not been sent.
If YES message is sent, If NO message is not sent and TO field is made blank, ready to be filled from next record.
If the final email is NOT sent, the mail message is left open and needs to be closed manually.
My question is - can I close it from the VBA script?
I know I can close the Outlook application via VBA, but want to leave Outlook open, only close the last mail item that has not been sent.