none
Show exchange folders and permission RRS feed

  • Question

  • Hello everyone,

    i would like to create a GUI which shows all folders and subfolders from my imap mailbox. Also I want to see the permission of every folder I click in and set permission for different users as a substitute. 

    The GUI will look like this and a additional panel with the permission information.

    I prefer to code it in C# otherwise VBA. My Environment Outlook 2013 and Visual Studio 2013 Professional.

    With best regards

    Vi

    Friday, January 10, 2014 10:39 AM

Answers

  • Keep in mind that Outlook does not provide any access to the IMAP4 Access Control Lists (RFC2086). You can access Exchange folders' ACLs, but nothing IMAP4 specific is exposed.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, January 10, 2014 1:43 PM
  • Your post mentions that you want to display folder permission for the IMAP mailboxes (even though the title of you post suggests Exchange).

    I was just bringing to your attention that ACL information is not exposed at all by the Outlook Object Model.

    If you drop down to the Extended MAPI level (or Redemption), you can access Exchange ACLs, but nothing is exposed for IMAP4. Unless of course you directly access the IMAP4 server bypassing any API exposed by Outlook.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, January 10, 2014 4:20 PM
  • Thank you for providing us with a screenshot. Unfortunately the Outlook object model doesn't provide properties or methods to get the permission information.
    Friday, January 10, 2014 5:19 PM
  • It does not matter if you are using VBA or C# - Outlook Object Model is still the same.

    Exchange ACLs can be set using Extended MAPI only - you will need to set and retrieve the PR_ACL_TABLE property.

    If using Redemption is an option (it wraps Extended MAPI and can be used from VBA or C#), you can use RDOFolder.ACL collection - see http://www.dimastr.com/redemption/RDOACL.htm


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, January 13, 2014 7:33 AM

All replies

  • Hi Vi,

    It looks like you forgot to attach an image. Note, you can configure two accounts in the profile for displaying folders for both accounts.

    Anyway, you can create a form region to extend a standard or custom Microsoft Office Outlook form by using the New Outlook Form Region wizard. You can create a new form region and design the user interface in Visual Studio, or you can import a form region that was designed in Outlook and add Visual Basic or C# code. Read more about this in the How to: Add a Form Region to an Outlook Add-in Project article in MSDN.

    Also you can use Windows API hooks for customizing Outlook UI and injecting your own form. Such forms also known as adjacent windows. Please see the Creating Adjacent Windows In Outlook sample project for details. There are commercial tools that allow you to place your controls on adjacent windows out of the box.

    Finally, Outlook 2010 introduced a new feature called Solutions Module. The Programming the Outlook 2010 Solutions Module article explains it in depth.


    Friday, January 10, 2014 11:21 AM
  • Keep in mind that Outlook does not provide any access to the IMAP4 Access Control Lists (RFC2086). You can access Exchange folders' ACLs, but nothing IMAP4 specific is exposed.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, January 10, 2014 1:43 PM
  • Hi  Eugene Astafiev,

    I can't upload pictures, because my profile isn't verfied by any reason. I tried this code in C# to catch the current session, but it isn't very useful. msdn.microsoft.com/en-us/library/office/ff869819.aspx

    Friday, January 10, 2014 3:55 PM
  • Hi,

    I don't know what you mean

    Friday, January 10, 2014 3:55 PM
  • This is the link for the attachment.

    social.msdn.microsoft.com/Forums/getfile/395688

    Friday, January 10, 2014 3:56 PM
  • Your post mentions that you want to display folder permission for the IMAP mailboxes (even though the title of you post suggests Exchange).

    I was just bringing to your attention that ACL information is not exposed at all by the Outlook Object Model.

    If you drop down to the Extended MAPI level (or Redemption), you can access Exchange ACLs, but nothing is exposed for IMAP4. Unless of course you directly access the IMAP4 server bypassing any API exposed by Outlook.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, January 10, 2014 4:20 PM
  • Thank you for providing us with a screenshot. Unfortunately the Outlook object model doesn't provide properties or methods to get the permission information.
    Friday, January 10, 2014 5:19 PM
  • That means, I can't set the permission via the Outlook Object in Outlook via VBA? Does the Outlook Object in C# have the property to set the Permission?

    Edit: Sorry I meant the Exchange mailbox.

    Monday, January 13, 2014 7:24 AM
  • It does not matter if you are using VBA or C# - Outlook Object Model is still the same.

    Exchange ACLs can be set using Extended MAPI only - you will need to set and retrieve the PR_ACL_TABLE property.

    If using Redemption is an option (it wraps Extended MAPI and can be used from VBA or C#), you can use RDOFolder.ACL collection - see http://www.dimastr.com/redemption/RDOACL.htm


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, January 13, 2014 7:33 AM