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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating outlook reminders from Access/VBA 1

Status
Not open for further replies.

SimonFinn

Programmer
Mar 13, 2003
130
GB
Hi

I need to create outlook reminders from access

Firstly i want to open outlook (or check is open)

Copying the details from controls on a form in access

But i have no idea where to start??!

Can anyone help?

Thanks Si
 
First set a reference to Microsoft Outlook object library from within VBE, then the following sub will show you an example of setting an appointment. You can change it to accommodate settings from your database. Good luck!

Sub CreateOutlookReminder()
Dim ol As Outlook.Application
Dim appt As Outlook.AppointmentItem
On Error Resume Next
Set ol = GetObject(, "outlook.application")
If Err <> 0 Then
Set ol = CreateObject(&quot;outlook.application&quot;)
End If
On Error GoTo 0
Set appt = ol.CreateItem(olAppointmentItem)
appt.Subject = &quot;Buy something!&quot;
appt.Start = Now + 30 / 60 / 24
appt.End = appt.Start + 30 / 60 / 24
appt.ReminderMinutesBeforeStart = 15
appt.Save
End Sub
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top