none
Outlook 2007 / 2010 Forms querying LDAP RRS feed

  • Question

  • I am in the middle of creating an Outlook form. I would like to create several drop-downs displaying Group Membership of certain Active Directory security groups. I would also like to create other drop-downs displaying the Content of certain AD OUs. In the Office Forum I was informed that this is beyond Outlook's scope and it was suggested I post here.

    Many thanks for you help on this one,

    Oliver

    • Moved by Bill_Stewart Tuesday, May 20, 2014 2:13 PM Move to more appropriate forum
    Tuesday, May 20, 2014 12:39 PM

Answers

  • See my other post.

    The problem you will likely have with Outlook Developers is that few of them have AD experience.  My reply to your old VBScript thread gives direction.

    Dmitry - all AD VBScript andVB6 examples can usually be used inside of a VBA project.  I do it all of the tie with Excel to generate lists.  The issue for Oliver wil be how to move the results of a VBScript/VB6 function into an Outlook form. 


    ¯\_(ツ)_/¯

    • Marked as answer by Marvin_Guo Tuesday, May 27, 2014 1:29 AM
    Tuesday, May 20, 2014 2:58 PM
  • Hi,

    I’m not familiar with AD, but according to JRV’s description, if you want to know how to fill combobox control on the Outlook form using VBS, you can refer to code below:
    I added a new form (P.2) to the standard Message form, dragged a command button and ComboBox from Control Toolbox.

    Sub CommandButton1_Click()
    	Set FormPage = Item.GetInspector.ModifiedFormPages("P.2") 
    	Set Control = FormPage.Controls("ComboBox1") 
    	Control.PossibleValues = " Item1;Item2;Item3;Item4"
    End Sub

    Regard,
    Marvin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Marvin_Guo Thursday, May 22, 2014 9:44 AM
    • Marked as answer by Marvin_Guo Tuesday, May 27, 2014 1:29 AM
    Thursday, May 22, 2014 9:41 AM

All replies

  • Why is everyone posting VBA and Outlook VBA questions in the Administrative Scripting forum.  VBA is NOT script. It is compiled Visual Basic for Applications.

    Please post VBA issues in the VBA forum.

    If you are trying to learn touse AD with VB then you may want to consider using VB.Net to build you application.  You can also try to use VB late binding methods in VBA.  Look at the learning center and learn to use VBScritp to returnthe information you want thenpost it to VBA.

    Start here: http://technet.microsoft.com/en-us/scriptcenter/dd793613

    Post back with specific VBScript questions.


    ¯\_(ツ)_/¯

    Tuesday, May 20, 2014 1:56 PM
  • What data exactly are you trying to retrieve?

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

    Tuesday, May 20, 2014 2:35 PM
  • Sorry for the mis-post... I simply posted in the forum advised by TechNet Community Support (see Forum post http://social.technet.microsoft.com/Forums/office/en-US/3bb708df-e184-445b-90d9-1550504c76df/outlook-2007-2010-forms-querying-ldap?forum=Outlook).
    Tuesday, May 20, 2014 2:40 PM
  • Group membership can be accessed in Outlook using AddressEntry.GetExchangeUser.GetMemberOfList.

    The members of a particular group can be accessed using AddressEntries.Members.


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

    Tuesday, May 20, 2014 2:49 PM
  • I would like to present the Membership of a certain AD Security Group in a drop-down. Let's say I have a security Group called "Group1" with members "user1", "user2" & "user3". I would like to present a drop-down displaying the 3 members.

    Additionally, I would like to have another drop-down which lists all Security Groups in a particular OU.

    Thanks.

    Tuesday, May 20, 2014 2:51 PM
  • See my other post.

    The problem you will likely have with Outlook Developers is that few of them have AD experience.  My reply to your old VBScript thread gives direction.

    Dmitry - all AD VBScript andVB6 examples can usually be used inside of a VBA project.  I do it all of the tie with Excel to generate lists.  The issue for Oliver wil be how to move the results of a VBScript/VB6 function into an Outlook form. 


    ¯\_(ツ)_/¯

    • Marked as answer by Marvin_Guo Tuesday, May 27, 2014 1:29 AM
    Tuesday, May 20, 2014 2:58 PM
  • Hi,

    I’m not familiar with AD, but according to JRV’s description, if you want to know how to fill combobox control on the Outlook form using VBS, you can refer to code below:
    I added a new form (P.2) to the standard Message form, dragged a command button and ComboBox from Control Toolbox.

    Sub CommandButton1_Click()
    	Set FormPage = Item.GetInspector.ModifiedFormPages("P.2") 
    	Set Control = FormPage.Controls("ComboBox1") 
    	Control.PossibleValues = " Item1;Item2;Item3;Item4"
    End Sub

    Regard,
    Marvin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Marvin_Guo Thursday, May 22, 2014 9:44 AM
    • Marked as answer by Marvin_Guo Tuesday, May 27, 2014 1:29 AM
    Thursday, May 22, 2014 9:41 AM