Setting Appointments for Someone else

Late4Supper

Registered User.
Local time
Today, 14:35
Joined
Sep 16, 2002
Messages
32
I'm creating a marketing app that sets appointments for the sender and others (to Outlook Calendar). Everything is fine and dandy except that when the app sends the appointment to the recipient it shows in their Outlook Inbox. This requires the recipient to manually Accept the appointment. This is a step I want to avoid if at all possible.

I've modified the Outlook delegate Calendar permissions to allow the sender to read/create so I must be missing a vital line somewhere.

Here's where I'm sitting now:

Function CreateAppointment() As Boolean
Dim outObj As Outlook.Application
Dim objNewAppt As Outlook.AppointmentItem
Set outObj = CreateObject("outlook.application")
Set objNewAppt = outObj.CreateItem(olAppointmentItem)

With objNewAppt
.ReminderSet = True
.Duration = 0
.MeetingStatus = olNonMeeting
.Subject = "Just to see if you're awake test 2 "
.Start = #4/11/2003 2:00:00 PM#
.ResponseRequested = False
End With
Set myAppt = objNewAppt.Recipients.Add("Recipient")

objNewAppt.Send
'next 3 lines used to bypass sender's prompt
objNewAppt.Display
SendKeys "%(n)", True
SendKeys "%(s)", False

CreateAppointment = True


Thanks for any help or suggestions.
 
This of course is normal..how else would this initiate your code? In your case you need to add code by creating a dll via visual basic that is triggered on the "Sent Message" as soon as the message is sent you catch this and you run your code automatically without having the user open up the email to initiate your code. Your halfway there. I have done something quite similiar in code via Outlook tasks. You will have to use the events that Outlook triggers like load, etc to handle this.

Jon
 
Thanks, Jon, I'll give a shot.
 

Users who are viewing this thread

Back
Top Bottom