views:

13

answers:

0

I've tried to send a meeting request using another account in Outlook using an Outlook Addin. The organizer should be that account, and the meeting must be in the calendar of the account.

I've created the following code:

Account myAccount=null;
foreach(Account objAccount in Application.GetNamespace("mapi").Accounts)
 if(objAccount.SmtpAddress == "[email protected]")
  myAccount = objAccount;
AppointmentItem objAppointmentItem = this.Application.CreateItem(Outlook.OlItemType.olAppointmentItem);
objAppointmentItem.SendUsingAccount = myAccount;
objAppointmentItem.MeetingStatus = OlMeetingStatus.olMeeting;
objAppointmentItem.Display();

The organizer is set correctly. However, when i want to send it, i got the following warning:

This meeting is not in the Calender folder for this account. Reponses to this meeting will not be tallied. Do you want to send anyway?

Afterwards, the meeting is placed in my own calender instead of the calender of the second account.

Does anyone has a solution for this?

Thank you!