Microsoft Office Tutorials and References
In Depth Information
Sending Daily Attachments to Certain Recipients
View the Appendix to learn how to store this procedure
in the ThisWorkbook module.
Option Explicit¶
' * * * * *¶
Private Sub Workbook_BeforeClose(Cancel As Boolean)¶
Call KillTimer(True)¶
End Sub¶
Follow these steps:
1. The first code section goes in a Standard module. The second code
section goes in the ThisWorkbook module of the Excel workbook that
contains the list of e-mail addresses.
2. Set the myInterval value as the Send & Receive time setting. Set the
howMany value as the number of e-mails that the Outlook application
can send within the Send & Receive time.
3. This macro runs from Microsoft Excel. The example file has assigned
this macro to a button for easy use.
Out
Sending Daily Attachments to Certain Recipients
This macro sends an e-mail to specific recipients with a local file attached by
using a recurring task entry.
Scenario: A method similar to the one used in the Sending
a Message Individually to Multiple Recipients section on page
285 can be used to send daily updated files from a local
computer via e-mail. Suppose it is your responsibility to send
an Excel file to all department heads each day at 3:00 p.m.,
but you often forget to do it until it’s time to go home.
To send out updated files via e-mail on a daily basis, create a Recurring Task
Item by using a custom category and reminder, and then enter a local file name
into the task body. A custom category to tell the macro that the code should
process a Task Item is necessary. The ‘Daily Report Sender’ category name is
used in this sample code.
 
Search JabSto ::




Custom Search