Dave,
Very possible. Not 100% familiar with Outlook VBA but I've code for Access that sends an email with an attachment once a file is over a week old. The code should be pretty similar for you. My problem is not knowing the events in Outlook VBA. If you know what event it can run on, you should be able to do something with this code.
Function SendMail(strPath As String, strQuery As String, strRecipient As String, strSubject As String)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim datFile As Date
Dim datDate As Date
Dim intWeekday As Integer
Dim strMessageBox As String
Dim strMessageBoxTitle As String
datFile = MondayDate(FileDateTime(strPath))
datDate = Date
If datFile < datDate - 6 Then
strMessageBox = "You are about to send mail to " & strRecipient & ". Your PC will hang for up to 3 minutes" & vbCrLf & "whilst this email is being created."
strMessageBoxTitle = "About to send mail to " & strRecipient & "."
MsgBox strMessageBox, vbOKOnly, strMessageBoxTitle
DoCmd.OutputTo acQuery, strQuery, "MicrosoftExcel(*.xls)", strPath, False, ""
Set objOutlook = CreateObject("Outlook.Application"
Set objOutlookMsg = objOutlook.CreateItem(Outlook.olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strRecipient)
objOutlookRecip.Type = Outlook.olTo
.Subject = strSubject
.Importance = Outlook.olImportanceHigh
.Attachments.Add strPath, olByValue
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
.Save
.Send
End With
strMessageBox = "You have just sent mail to " & strRecipient & "."
strMessageBoxTitle = "Sent mail to " & strRecipient & "."
MsgBox strMessageBox, vbOKOnly, strMessageBoxTitle
End If
End Function
Function MondayDate(Today As Date) As Date
Dim intWeekday As Integer
intWeekday = WeekDay(Today, vbMonday)
MondayDate = Today - intWeekday + 1
End Function