Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Owner DL (CDO?) (Outlook2003)

    I have this code (see snippet below) listing the DL name, its members and some member properties (like name etc.) and need to (also) find out who the owner of the DL is. I looked in CDO and found a call; but that doesn't seem to work for me. Anyone with a suggestion (doesn't have to be CDO).

    Set objSession = CreateObject("MAPI.Session")
    objSession.Logon ShowDialog:=False, NewSession:=False
    '
    Set objUser = objSession.CurrentUser ' Get current user
    Set objNewMessage = objSession.Outbox.Messages.Add ' Create new message and set DL
    Set objNewRecip = objNewMessage.Recipients.Add
    objNewRecip.Name = MainDL
    objNewRecip.Resolve ' Resolve address against the Exchange Directory
    Set objDistributionList = objNewRecip.AddressEntry ' Set Distribution List and get members
    Set objMembers = objDistributionList.Members

    ' Loop through the members
    For Each objmember In objMembers
    FN = objmember.Fields(CdoPR_GIVEN_NAME).Value 'First Name

    etc.

    (When I run, my tool 'eats' memory. I "Set" most variables back to "Nothing" after use bug that doesn't seem to help. Any suggestions here?)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Owner DL (CDO?) (Outlook2003)


  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Owner DL (CDO?) (Outlook2003)

    Yep, had found that too and looked at the GetDLOwner module. Either I am doing something wrong, I don't understand it or it doesn't work... ;-)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Owner DL (CDO?) (Outlook2003)

    Sorry, no idea then.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Owner DL (CDO?) (Outlook2003)

    All this stuff is way beyond me, but you might take a look at Grabbing Owner info on a "Global Address List" Distribution List. It's on Experts Exchange, ignore all warnings that you need to register and scroll down all the way to see the replies.

  6. #6
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Owner DL (CDO?) (Outlook2003)

    Thanks, to be honest... that's somewhat beyond me as well. I tried something out (and actually ran the VBS script). It didn't work....

    UPDATE: the result file from the script was empty when I wrote this quick reply; now it appears that the script was still running (I stopped the process now) and looking at the output I now do see all DLs listed with their owners. Still doesn't help me much as I have no clue how this works for ONE named DL and is I can implement that in VBA (the link seems to mention that this would give some problems)

    Strange, don't you think... I can process our whole GAL and list all in there, recursing into sub-groups. The one think I do not see to be able to do is simple get the name of the owner of each DL...

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Owner DL (CDO?) (Outlook2003)

    I'm afraid that I can't offer further help, sorry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •