tags:

views:

241

answers:

2

Hi,

I am using below code:

Redemption.RDOAppointmentItem objAppointment;

Redemption.RDORecurrencePattern objRecurrence;

objAppointment = (Redemption.RDOAppointmentItem)p_objDestFolder.Items.Add( p_objDestFolder.DefaultItemType);

objAppointment.OptionalAttendees = "[email protected]";

objAppointment.RequiredAttendees = "[email protected];

objAppointment.Save();

But above code not adding contact into Caledar.

Can anyone help me out in it.

Regards,

Saggy

A: 

The fact that you are using Redemption should not make a difference:
Use AppointmentItem.Recipients.Add() to add recipients.
To set them as optional or required (default) set the recipient type to olRequired or olOptional (see OlMeetingRecipientType in the Object Browser in Outlooks Macro Editor).

Examples:
Recipients.Item(1).Type = olRequired
Recipients.Add("[email protected]").Type = olOptional

Georg Fritzsche
A: 

This is the code I am currently using to schedule an appointment:

RDOSession session = new RDOSession(); session.Logon(System.Reflection.Missing.Value, System.Reflection.Missing.Value, false, true, System.Reflection.Missing.Value, false);

RDOFolder calendar = session.GetDefaultFolder(rdoDefaultFolders.olFolderCalendar);

RDOAppointmentItem oAppointment = (RDOAppointmentItem)calendar.Items.Add(rdoItemType.olAppointmentItem);

oAppointment.Subject = "This is a test subject"; oAppointment.Body = "This is a test body"; oAppointment.Start = DateTime.Now; oAppointment.End = DateTime.Now.AddMinutes(15); oAppointment.ReminderSet = true; oAppointment.ReminderMinutesBeforeStart = 30; oAppointment.Importance = (int)rdoImportance.olImportanceNormal; oAppointment.BusyStatus = rdoBusyStatus.olBusy;

oAppointment.Save();

oAppointment = null; calendar = null; session.Logoff(); session = null;

heydmj