Link to home
Start Free TrialLog in
Avatar of B_rider
B_rider

asked on

Scheduling outlook macro to run weekly

Hi All,

I'm look for the most efficient way to send a file on your hardrive as an attachement via email.
The closes I've got so far is an Outlook macro
Sub sl()
    Dim olApp As Outlook.Application
    Dim objMail As Outlook.MailItem
    Set olApp = Outlook.Application
    Set objMail = olApp.CreateItem(olMailItem)
    objMail.BodyFormat = olFormatPlain
    objMail.Subject = "Hi buddy"
    objMail.Body = "Whats up" + Chr(13) + Chr(10) + "Greg"
    objMail.To = "putin@email.com"
    objMail.Attachments.Add ("C:\TEMP\test.csv")
    objMail.Send
End Sub


I don't know how to schedule this macro to run Monday morn for example every monday.

Any help would be greatly appreciated (also if you know of another way to automatical email a file that would be helpful as well)

Thanks,
Paul
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of B_rider
B_rider

ASKER

Hi this worked great thanks!