-1

I'm developing an Outlook plugin (VS2013/CSharp/Outlook 2010 AddIn Project) and I need to set programatically the room list that appears when you try to create an appointment.

As far as I know, those rooms are loaded from the active directory, but I need to show them "per-user".

avenet
  • 2,894
  • 1
  • 19
  • 26

1 Answers1

1

Application.Session.AddressLists.Item("All Rooms") should do the job.

EDIT: Outlook hardcodes that list - to the best of my knowledge, Outlook looks for the address list exposed by GAL (PR_AB_PROVIDER_ID = MUIDEMSAB) with the 0x200 bit set in the PR_CONTAINER_FLAGS property. You cannot create new GAL containers programmatically, at least not from the client side.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • 1
    Excuse me? How does this not provide an answer to the question? The code snippet above retrieves AddressList object corresponding to the "All Rooms" GAL list. – Dmitry Streblechenko Dec 16 '13 at 20:42
  • Hi Dmitry, thanks you for your quick response. Your answer gave me the clue to write the following code, I will edit your answer and mark it as correct. – avenet Dec 16 '13 at 20:49
  • Hi Dmitry, actually the collection for "All Rooms" is readonly, is there a way to modify it? Thank you... – avenet Dec 16 '13 at 21:17
  • No, "Add Rooms" is hardwired to open the GAL "All Rooms" container. – Dmitry Streblechenko Dec 16 '13 at 22:07
  • So...what you mean is I cannot modify the "All Rooms" container? Is there any way to do that, perhaps creating another "container" programatically via Outlook plugin? is it possible? Thank you... – avenet Dec 17 '13 at 19:13
  • No, it is hardcoded - to the best of my knowledge, Outlook looks for the address list exposed by GAL (PR_AB_PROVIDER_ID = MUIDEMSAB) with the 0x200 bit set in the PR_CONTAINER_FLAGS property. You cannot create new GAL containers programmatically, at least not from the client side. – Dmitry Streblechenko Dec 17 '13 at 20:12