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

Create calendar item from Access 1

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
0
0
US
Anything is possible. So how do I create an item for an Outlook calendar from MS Access?

A special thanks in advance to the Guru who responds.

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
This example demonstrates how to use Automation to add appointments to the Microsoft Outlook calendar.

Sub AddAppt()
Dim objOutlook As Outlook.Application
Dim apptOutlook As Outlook.AppointmentItem
Set objOutlook = CreateObject("Outlook.Application")
Set apptOutlook = objOutlook.CreateItem(olAppointmentItem)
With apptOutlook
'Set date and time of the appointment
.Start = Date & " 2:00 pm"

'Set length of appointment in minutes
.Duration = 60

'Set Subject, Body, and Location of the appointment
.Subject = "Sales Meeting"
.Body = "The sales meeting starts promptly at 2:00 PM." _
& vbCrLf & "Please be on time."
.Location = "Conference Room 1"

'Set the attendees which must attend
.RequiredAttendees = "Nancy Davolio;Andrew Fuller"


'Set reminder for 10 minutes before appointment
.ReminderMinutesBeforeStart = 10
.ReminderSet = True
.Save
End With
Set apptOutlook = Nothing
Set objOutlook = Nothing
End Sub

Hope this helps

Jonathan
 
Hi

Very much a novice.

The code to use Outlook calendar is very useful but I need to know where I put it to get it to run.

I am using access 2000

Regards

Jacquie
 
I think you could just put this code in a module and run it. Ideally, you would put it in a class module for a form that has fields that the user could input data to be used in the calendar.

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Awesome Racal, * 4 U.

Is there a source you have for tieing into Outlook? I have only ever worked with Sendobject for emailing and this is the first I have seen for another operation.

Is there a source for Access->Outlook ties?

Thanks. Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top