Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling an email to be sent automatically 1

Status
Not open for further replies.

dodgychris

Technical User
Feb 27, 2003
19
GB
Hi,

I'm running outlook 2002 and every month I have to send the same email to an end user to ask them to complete a job...

Is there any way I can automate this?

I know that I could set them a task that regenerates, but this particular user is somewhat senior to myself and would take great offence at the fact that I'm sending them a 'task' to complete...

Don't ya just love office politics?

Any ideas (legal - non-killing ideas... that is ) would be gratefully received...

Many thanks.
 
Might be easiest to just set it up as a recurring appointment, show time as "Free" so you don't impact their availability. Make the first word "Reminder" which should not offend them as if you were "tasking" them.
 
The easiest way to do this is to create a microsoft access database which has an autoexec macro. The macro should run a piece of code to send an email automatically. The following is the code I use.

Function NewMailMessage()
Dim ol As New Outlook.Application
Dim ns As Outlook.NameSpace
Dim newMail As Outlook.MailItem

'Return a reference to the MAPI layer.
Set ns = ol.GetNamespace("MAPI")

'Create a new mail message item.
Set newMail = ol.CreateItem(olMailItem)
With newMail
'Add the subject of the mail message.
.Subject = "Reminder"
'Create some body text.
.Body = "Mr Bloggs" & vbCrLf & vbCrLf & "Please ensure that you have completed the job by 28th February" & vbCrLf & vbCrLf & "Regards" & vbCrLf & vbCrLf & "Elise" & vbCrLf & vbCrLf

'Add a recipient and test to make sure that the
'address is valid using the Resolve method.
With .Recipients.Add("Mr Bloggs")
.type = olTo
If Not .Resolve Then
MsgBox "Unable to resolve address.", vbInformation
Exit Function
End If
End With


'Send the mail message.
.Send

End With

'Release memory.
Set ol = Nothing
Set ns = Nothing
Set newMail = Nothing
End Function

Now, use a piece of scheduling software to open up your database at the required times. The e-mail will then send automatically.Remember that in your Database, you will have to set a reference to the Microsoft Outlook Library.

HTH

Elise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top