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

Creating Outlook Calendar appointments via email 2

Status
Not open for further replies.

ssmgr

Technical User
Feb 2, 2003
40
AU
The online MS-Outlook application allows you to create an appointment in the calendar, invite attendees, and email the invitation. The email actually updates the attendee's calendar. However, I can't work out how to do that in VBA.

I can create and send and email using VBA, and I can create an appointment in my own calendar using VBA, but I haven't been successful in updating the email recipient's calendar.


Can anyone point me in the right direction please?

Steve
 
You are looking for a MeetingItem, this is a variant of the AppointmentItem. Here is an exerpt from the Outlook 2K help file:
Unlike other Outlook objects, you cannot create this object. It is created automatically when you set the MeetingStatus property of an AppointmentItem object to olMeeting and send it to one or more users. They receive it in their inboxes as a MeetingItem.

The following snipit will change the AppointmentItem to a MeetingItem:
Code:
Set myItem = myOlApp.CreateItem(olAppointmentItem)
myItem.MeetingStatus = olMeeting
Now you will need to add participants:
Code:
Set myRequiredAttendee = myItem.Recipients.Add("Nate _
    Sun")
myRequiredAttendee.Type = olRequired
Set myOptionalAttendee = myItem.Recipients.Add("Kevin _
    Kennedy")
myOptionalAttendee.Type = olOptional
The easiest way to add recipients is to use thier full email address (this example uses resovlable names which is computer dependent).

Hope this helps,
CMP
 
Thanks very much CMP. That's exactly the information I was looking for, and I think it deserves a star.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top