Sent Appointment - not visible

G

Guest

Hi,

specs: Outlook 2003 - winXP

I'm developing an Acces database with some automation to Outlook. In Access
I create an appointment which I want to automate and sent via Outlook.

This is what I have so far:

Dim objApp As New Outlook.Application
Dim objAppointment As Outlook.AppointmentItem
Dim objSession As Object

Set objApp = CreateObject("Outlook.Application")
Set objAppointment = Outlook.CreateItem(olAppointmentItem)

With objAppointment
.Start = rst("StartDate") '-> Extract from Access
.End = rst("EndDate")
.Recipients.Add (rst("Addressee"))
.Subject = rst("Subject")
.ReminderSet = IIf(rst("Reminder") = -1, True, False)
.Location = rst("Locatie")
.Send
End With

When I run this code the appointment seems to be made but I don't see it in
de calendar of the person I sent it to.

If I choose .Display I see the appointment and I can click Send. If I choose
Send I don't see the appointment
What piece of code am I missing here?

thanks in advance for any pointers...
 
K

Ken Slovak - [MVP - Outlook]

You will need to set item.MeetingStatus = olMeeting. You also should set the
properties of any recipients as required (olTo), or optional (olCC) or as
resources (olBCC). See the help in the Object Browser for
AppointmentItem.MeetingStatus.
 
G

Guest

Hi ken,

Thanks for replying. I'll set the options as you stated. Finally I know ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top