Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Redemption: DistributionList that reference another DistributionList

92 views
Skip to first unread message

sandeep...@gmail.com

unread,
Aug 18, 2008, 1:38:50 AM8/18/08
to
I am looking to iterate over the members of a DistributionList. The
members can either be a contact or another DL. Using the
RDOAddressEntry.GetContact() which retruns RDOContactItem i can
retrieve the contact properties but how can i get reference to
RDODistList item in case the member is a DL, GetContact() only returns
RdoContactItem ? Does redemption expose functionality to retrieve
properties of DL which is a member of another DL? I am talking about
private DL.

Dmitry Streblechenko

unread,
Aug 18, 2008, 3:24:11 AM8/18/08
to
When you iterate through the DL members using RDOAddressEntery.Members
collection, you can call RDOAddressEntry.GetContact for each member.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
<sandeep...@gmail.com> wrote in message
news:2e9c54e8-44ad-4e24...@r15g2000prh.googlegroups.com...

Sandeep

unread,
Aug 18, 2008, 3:52:52 AM8/18/08
to
thanks Dmitry for reply, i called RDOAddressEntry.GetContact() method
but it returns RDOContactItem. Can't i get reference to the
RDODistListItem in anyway? I will then use the RdoDistListItem.Members
to iterate over its members.

Basically what i want to do is extract the contacts of a
DistributionList and its sub distribution lists if it contains any.

Regards,
Sandeep


Dmitry Streblechenko

unread,
Aug 18, 2008, 12:58:34 PM8/18/08
to
No, you can only get back RDOContactItem

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-

"Sandeep" <sandeep...@gmail.com> wrote in message
news:bfb7e799-50f4-46f9...@v13g2000pro.googlegroups.com...

Sandeep

unread,
Aug 20, 2008, 11:25:21 PM8/20/08
to
Ok this is how i got it done. I couldn't get the RDODistList handle to
sub distribution lists but achieved what i wanted to do.
When iterate over the members in RDOAddressEntry, i checked the
RDOAddressEntry.DisplayType property whose values equal to 1 or 5 mean
that either it is EX DL or private DL. Then again extract its members
to retrieve the contact items.

Kalyan

unread,
Nov 5, 2008, 5:45:01 AM11/5/08
to
Hi,
I've Redemption installed with Outlook 2007. I tried out the following code
using RDO. In the following code snippet, after the 6th line "set Sesn =
CreateObject("Redemption.RDOSession")" , it doesn't work or throw any error
message.

What else is required in addition to installing Redemption? Yours assistence
is much appreciated.

function TestRedemtionDL
MsgBox "in TestRedemtionDL"
set outlookObj=CreateObject("Outlook.Application")
set sessionObj = outlookObj.GetNameSpace("MAPI")
MsgBox "in TestRedemtionDL after app"
set Sesn = CreateObject("Redemption.RDOSession")
if Err.number <> 0 or Sesn = nothing then
MsgBox "in TestRedemtionDL after RDOSession"
end if
'Sesn.Logon
Sesn.MAPIOBJECT = sessionObj.MAPIOBJECT
MsgBox " Sesn.CurrentUser.Name " & Sesn.CurrentUser.Name
MsgBox "logging in"
set AB = Sesn.AddressBook
MsgBox "After AB "
set Recips = AB.ShowAddressBook
MsgBox Recips.Count
MsgBox "Err " & Err.Description
end function

-Kalyan

Kalyan

unread,
Nov 5, 2008, 5:52:03 AM11/5/08
to
I'm trying an VBS code to enumerate/expand the distribution list(DL) and get
the members of DL. Following code snippet is not working, member count is 0.
Could anybody please help on this. Your help is much appreciated. I did
exhaustive googling on it.

.........
set utilobj = CreateObject("Redemption.MAPIUtils")

set colCDORecips = utilobj.AddressBook(Nothing,"Select Recipient",False,
True, 1,"To")
Count = colCDORecips.Count

For i = 1 To Count
'MsgBox "redemtion " & Count
Set recipientObj = colCDORecips.Item(i)
MsgBox "recipientObj.AddressEntry.Type " &
recipientObj.AddressEntry.Type
MsgBox "recipientObj.AddressEntry.DisplayType " &
recipientObj.AddressEntry.DisplayType
MsgBox "recipientObj " & recipientObj.DisplayType
displayName=recipientObj.Name
contactType= recipientObj.AddressEntry.Type
if contactType = "EX" then
if recipientObj.AddressEntry.DisplayType = 1 then
'set Citems = recipientObj.GetMember(1)
'email=oEDL.PrimarySmtpAddress
'set SafeDist = CreateObject("Redemption.SafeDistList")
Set oDL = recipientObj
Call ShowGALInfoFromDL(recipientObj)
'SafeDist.Item=recipientObj
'SafeContact.Item=recipientObj.AddressEntries
else
email=recipientObj.AddressEntry.Fields(&H39FE001F)
addEmailItems displayName, email, mode
end if
elseif contactType = "SMTP" then
email=recipientObj.Address
addEmailItems displayName, email, mode ......
......

-Kalyan

Ken Slovak - [MVP - Outlook]

unread,
Nov 5, 2008, 10:08:42 AM11/5/08
to
Is Redemption registered?

In your test you have this line:

if Err.number <> 0 or Sesn = nothing then

You can't test for Sesn being Nothing that way, you have to test for If Sesn
Is Nothing instead.

So is Sesn nothing? Which message boxes do you get?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Kalyan" <Kal...@discussions.microsoft.com> wrote in message
news:5A8CCFC7-C71C-4EB4...@microsoft.com...

Dmitry Streblechenko

unread,
Nov 5, 2008, 2:04:00 PM11/5/08
to
See my reply to your other post.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-

"Kalyan" <Kal...@discussions.microsoft.com> wrote in message

news:F8A183F7-B16A-436E...@microsoft.com...

Kalyan

unread,
Nov 6, 2008, 5:25:01 AM11/6/08
to
Hi Ken,
You are right. I've corrected the code. This is the error I'm getting after
'CreateObject("Redemption.RDOSession")' statement
"ActiveX component can't create object"
Err.number 429

Can you help me in using "Redemption.MAPIUtils" (instead of
Redemption.RDOSession) if the above is not possible?

-Kalyan

Ken Slovak - [MVP - Outlook]

unread,
Nov 6, 2008, 8:59:28 AM11/6/08
to
If you're getting that error then you have to fix it before you could use
MAPIUtils. The error tells us that either Redemption is not registered
(check in HKCR\Redemption and see if that area exists and shows the various
Redemption classes), or that a script stopper is running that prevents using
CreateObject (or New or GetObject).

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Kalyan" <Kal...@discussions.microsoft.com> wrote in message

news:1DD49DBF-2B05-4F14...@microsoft.com...

vikram.r...@gmail.com

unread,
Jan 22, 2015, 12:49:20 PM1/22/15
to
Can we expand the distribution group members for standalone Redemption.. means on server where outlook is not installed?
0 new messages