Members property of contact folder distribution lists - returns gobbledygook in lovely looking array 
Author Message
 Members property of contact folder distribution lists - returns gobbledygook in lovely looking array

I am accessing distribution lists in a public folder programatically
and getting gobbledygook back - for example, one of the array elements
is "q pl  ???????? ?????????   ???????????????????????????????? M   o?! t?` R ! F   A?! .     ?  d?     ?                 "

When I change the number of members in the distribution list, I get
the right number of array elements back, but all gobbledygook.  The
process works, but the results are unusable.

I was expecting to get user names.

I have two questions;
* Does anyone know how to get user names out of contact folder
(OTM.distlist items) distribution lists?
* Failing that, perhap someone knows how to make use of these strings?

I don't want to access the GAL instead because of Outlook Object Model
Guard concerns.

************The long story***************
The broader background of the project is that I wrote a stack of code
that used the GAL distribution list members property to authenticate
the current user for being allowed to send specific message types.
That worked.

Until the Outlook Object Model Guard.

I am using Outlook Redemption to get around that, which mostly works,
but there is confirmedly no support for GAL access (confirmed with
Dimitry, though perhaps this function will be available in the

I am changing my approach by storing DL's in a public folder instead
and authenticating against them.  That's working.  The object model
guard doesn't even seem to get triggered (interesting).

However, I need names for authentication, not a bunch of squares and
question marks.

Here's a sample of the test code;

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set fldSecurityDistributionLists = myNameSpace.Folders("Public
Folders").Folders("All Public
Folders").Folders("i-Manager").Folders("Security Distribution Lists")

'***********************Read distribution list item from folder
Set itmSecurityList = fldSecurityDistributionLists.Items("Purruna

'Find Distribution Lists permitted for the chosen message type

    allowed = itmSecurityList.Members

The "allowed" variable then returns an array populated with the
gobbledygook elements.

Mon, 09 Aug 2004 15:09:44 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Link between Outlook Distribution List Members and Contacts

2. Distribution lists in the Contacts Folder

3. Using VBA to Create a Contact Folder Distribution List from MS Access

4. add member into Distribution List

5. Members of distribution list

6. Trouble deleting members of distribution list

7. GAL Distribution List members

8. How do I programmatically ad a new member to a Distribution List

9. Add members to a distribution list

10. I can't add a new member to a distribution list in Outlook by VBScript

11. Details of members of a distribution list

12. Error creating members in a distribution list


Powered by phpBB® Forum Software