From: Norm on

One problem... we use Lotus Notes
can I just replace LotusNotes where it says Outlook?


"Gary Brown" wrote:

> Use Windows Scheduled Tasks to run your macro at specific times/days.
> The basics of the macro would be something like this....
>
> '/========================================/
> ' Sub Purpose: example of how to send a file attachment
> ' Requires reference to Microsoft Outlook
> '/========================================/
> '
> Public Sub SendTheEmail()
> Dim olApp As Outlook.Application
> Dim objMail As Outlook.MailItem
> Dim objAttachments As Outlook.Attachments
> Dim strTo As String, strSubject As String
> Dim strBody As String
> Dim strAttachment As String
> Dim strCC As String, strBCC As String
>
> On Error GoTo err_Sub
>
> ' - - - V A R I A B L E S - - - - - - - - -
> strAttachment = "C:\Temp\Test.txt"
> strTo = "MyEmailAdress(a)Anywhere.com"
> strSubject = "This is a Test of the Subject Area..."
> strBody = "This is where you have the Body of the eMail"
> strCC = "" 'CC:
> strBCC = "" 'Blind CC:
> ' - - - - - - - - - - - - - - - - - - - - -
>
> Set olApp = CreateObject("Outlook.Application")
> Set objMail = olApp.CreateItem(olMailItem)
> Set objAttachments = objMail.Attachments
>