Next Week Is MUCH Better For Me

[This is now documented here:]

This is just an interesting little nugget I was asked to document today.

Suppose you’re writing some Outlook Object Model code (using Outlook 2007, of course) and are trying to classify the kinds of items you’re working with. From the OOM, you’d start by looking at the type. Maybe it’s Outlook.MailItem. or Outlook.Contact, etc. This article illustrates the concept.

But what about Outlook.MeetingItem? It turns out there’s a number of things this could be. It could be a compose form if the message hasn’t yet been sent. It could be a regular meeting response. Or it could be a counter proposal. A counter proposal is when the recipient of the request has proposed a new time for the meeting.

Detecting the compose case is easy – just check Item.Sent. But how do you tell if it’s a counter proposal? That’s not something we covered in the OOM. But there’s a named property you can use to find out: dispidApptCounterProposal.

Since I’m a C++ guy, here’s the C++ definition:

#define dispidApptCounterProposal 0x8257

The property is in the PSETID_Appointment namespace (see my blog entry on Outlook 2007 properties). It’s type is PT_BOOLEAN.

Here’s some C# code that shows how you might use this property from the OOM:

   private bool IsCounterProposal(Outlook.MeetingItem meeting)
      const string counterPropose =
      Outlook.PropertyAccessor pa = meeting.PropertyAccessor;
      if ((bool)pa.GetProperty(counterPropose))
         return true;
         return false; 
Comments (1)

  1. Aneesh says:

    Hi ,

    I would like to ask you a queation about outlook addin.

    I want to make a new MeetingItem programmatically with C++ (without using VSTO).

    I could make new appointment item but not a new meeting item.

    This was my code :


    void CMFCDlg::OnButton1()


     _Application olApp;

      COleException e;

      if(!olApp.CreateDispatch("Outlook.Application", &e)) {

         CString str;

         str.Format("CreateDispatch() failed w/error 0x%08lx", e.m_sc);

         AfxMessageBox(str, MB_SETFOREGROUND);



     _NameSpace olNs(olApp.GetNamespace("MAPI"));

      COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);

      olNs.Logon(covOptional, covOptional, covOptional, covOptional);

    // Create a new appointment

     _MeetingItem olAppt(olApp.CreateItem(1));

       VARIANT Modal;

    bool bTest=true;


    // Save Appointment





    Can you help me please?