Can't get olAppointMentItem to open up an Appointment from Access

S

Steven Weigley

I have the following code:

Dim objOutlook As Outlook.Application
Dim objAppt As Variant
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olAppointmentItem)
'objAppt.Display
With objAppt
.Start = Date & #6:30:00 PM#
.Duration = 30
.Subject = "Test Appointment"
.Body = ""
.Location = ""
.ReminderMinutesBeforeStart = 15
.ReminderSet = True
'.Importance = olImportanceHigh
'.Recipients.Add "David Shank"
.Save
End With
MsgBox "Appointment created"

However, when I make the objAppt.Display line active, I
get a mail message that pops up. The weird thing is that
I can get all of the other items to work - Contact,
Distribution, Post, Task and Mail.

I am using Access 97 and trying to go into Outlook 2000.

I have the reference for Outlook 9.0.

Any suggestions?
 

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