Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7458643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:28:29+00:00 2026-05-29T13:28:29+00:00

Ok, I am trying to connect to a shared Outlook Calendar in C# using

  • 0

Ok, I am trying to connect to a shared Outlook Calendar in C# using Interop and add a new meeting request.

Here’s what I’ve got so far, starting with my using statements (this is a Windows form):

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Windows.Forms;
using Outlook = Microsoft.Office.Interop.Outlook;

Then I have a public class called “Appointments” which is below:

public class Appointments
{
    public string ConversationTopic { get; set; }
    public int Duration { get; set; }
    public DateTime StartTime { get; set; }
    public DateTime EndTime { get; set; }
    public string Organizer { get; set; }
    public int ReminderMinutesBeforeStart { get; set; }
    public string RequiredAttendees { get; set; }
    public string Subject { get; set; }
    public string Body { get; set; }
}

I have a new blank windows form with a Data Grid View currently called dataGridView1. The form load event code is below:

private void Form1_Load(object sender, EventArgs e)
{
    Outlook.Application oApp;
    oApp = new Outlook.Application();
    Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
    oNS.Logon(Missing.Value, Missing.Value, true, true);

    Outlook.Recipient oRecip = (Outlook.Recipient)oNS.CreateRecipient("Foo bar");
    Outlook.MAPIFolder oFolder = (Outlook.MAPIFolder) oNS.GetSharedDefaultFolder(oRecip, Outlook.OlDefaultFolders.olFolderCalendar);

    List<Appointments> appointmentList = new List<Appointments>();

    foreach (object item in oFolder.Items)
    {
        Outlook.AppointmentItem thisOne = (Outlook.AppointmentItem)item;
        appointmentList.Add(new Appointments { ConversationTopic = thisOne.ConversationTopic, Duration = thisOne.Duration, EndTime = thisOne.End, Organizer = thisOne.Organizer, ReminderMinutesBeforeStart = thisOne.ReminderMinutesBeforeStart, RequiredAttendees = thisOne.RequiredAttendees, StartTime = thisOne.Start, Subject = thisOne.Subject, Body = thisOne.Body });
    }

    dataGridView1.AutoGenerateColumns = true;
    dataGridView1.DataSource = appointmentList;
    dataGridView1.Sort(dataGridView1.Columns["Subject"], ListSortDirection.Descending);
}

This works flawlessly in connecting to my calendar and filling my Data Grid View with all of my relevant calendar information. Now I want to programmatically send a new Meeting Request to the calendar.

I’m guessing a Meeting Request is an oFolder.Item so I think I want to type:

oFolder.Items.Add(* details here *);

Inside the brackets, intellisense simply says the following:

dynamic_Items.Add([object Type = Type.Missing])

Now I’m stumped and help would be much appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T13:28:30+00:00Added an answer on May 29, 2026 at 1:28 pm
    using Outlook = Microsoft.Office.Interop.Outlook;    
    
    private void SetRecipientTypeForAppt()
        {
            Outlook.AppointmentItem appt =
                Application.CreateItem(
                Outlook.OlItemType.olAppointmentItem)
                as Outlook.AppointmentItem;
            appt.Subject = "Customer Review";
            appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting;
            appt.Location = "36/2021";
            appt.Start = DateTime.Parse("10/20/2006 10:00 AM");
            appt.End = DateTime.Parse("10/20/2006 11:00 AM");
            Outlook.Recipient recipRequired =
                appt.Recipients.Add("Ryan Gregg");
            recipRequired.Type =
                (int)Outlook.OlMeetingRecipientType.olRequired;
            Outlook.Recipient recipOptional =
                appt.Recipients.Add("Peter Allenspach");
            recipOptional.Type =
                (int)Outlook.OlMeetingRecipientType.olOptional;
            Outlook.Recipient recipConf =
               appt.Recipients.Add("Conf Room 36/2021 (14) AV");
            recipConf.Type =
                (int)Outlook.OlMeetingRecipientType.olResource;
            appt.Recipients.ResolveAll();
            appt.Display(false);
        }
    

    via How to: Create a Meeting Request, Add Recipients, and Specify a Location

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect to an Active Directory from Activiti, using Apache Directory's LDAP
I am trying to connect database.sdf on same director. Using following code but gives
I am using a shared hosting through CIPL.in. They use cpanel. I am trying
long-time listener, first-time caller! I’m trying to connect to MySQL using the ADO.NET Entity
I’m trying to separate the functionality of a shared-add-in and a corresponding Ribbon (integrated
I am trying to connect to Oracle DB using JDBC. I have put ojdbc.jar
When trying to connect to Github on a new (I'm the first to try)
I'm trying to connect to an SQL Server 2008 database in a shared hosting
I'm trying to use Net::SSH::Perl to connect using public keys with this code: my
When trying to connect to an ORACLE user via TOAD (Quest Software) or any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.