I have a spreadsheet that works great to deliver worksheets as attachments via email. I have this in the Outlook section of the code:
I want to give the user the option to turn on what I will call Automatic Emails which will simply change the code to .Send as opposed to .Display
I have a Workbook_Open routine so my thoughts are I would prompt the user there on OPEN if they want to turn on Automatic Email.
Can someone suggest how to do make this work.
One other thing to mention is the code loops through all the tabs in the workbook and potentially sends 40 emails at once so I cannot prompt the user inside of the loop.
Thanks
VBA Code:
'Uncomment one or the other of the following 2 lines
.Display 'to show and require manual send for each email
'.Send 'to send each email immediately
I want to give the user the option to turn on what I will call Automatic Emails which will simply change the code to .Send as opposed to .Display
VBA Code:
'Uncomment one or the other of the following 2 lines
'.Display 'to show and require manual send for each email
.Send 'to send each email immediately
I have a Workbook_Open routine so my thoughts are I would prompt the user there on OPEN if they want to turn on Automatic Email.
Can someone suggest how to do make this work.
One other thing to mention is the code loops through all the tabs in the workbook and potentially sends 40 emails at once so I cannot prompt the user inside of the loop.
Thanks