I have created a worksheet containing a PivotTable report that I need to be able to send via e-mail.
I wrote some VBA code inside the worksheet titled "Rpt_Practice_Admin". It was taken from this website:
http://msdn.microsoft.com/en-us/library/bb268022.aspx
Scroll down to the section titled, "Sending a Single Worksheet by E-mail".
Here's a step-by-step account of what I did:
To continue saving as a macro-free workbook, click Yes."
For more information about e-mail safety and how you might be able to avoid getting this warning, click Help."
Regards.
I wrote some VBA code inside the worksheet titled "Rpt_Practice_Admin". It was taken from this website:
http://msdn.microsoft.com/en-us/library/bb268022.aspx
Scroll down to the section titled, "Sending a Single Worksheet by E-mail".
Here's a step-by-step account of what I did:
- Wrote the VBA Code
- Replaced the line ActiveSheet.Copy with Sheets("Rpt_Practice_Admin").Copy
- Compiled, then executed (ran) the code.
- A window appears on the screen reading:
- VB project
To continue saving as a macro-free workbook, click Yes."
- Click "Yes".
- Another window appears reading:
For more information about e-mail safety and how you might be able to avoid getting this warning, click Help."
- Click "Allow".
- The same window reappears with the same message.
- Click "Allow".
- The same window reappears one more time.
- Click "Allow".
- Signed into the e-mail account written inside the method .SendMail someone@somewhere.com, "This is the Subject line"
- Check the Inbox and the worksheet was nowhere to be seen.
Regards.