We help IT Professionals succeed at work.

Get distinguished name (DN) of public folder in Vb code

nickwoolley
nickwoolley asked
on
Can I get the distinguished name (DN) of a public folder using Vb code? eg for our folder Fred the DN is: ?/o=Timeframe Software Limited/ou=TIMEFRAME/cn=Recipients/cn=FREDE17FB984E17FB984E17FB984A025001C00AFD9?) I thought it might be held in the registry but I didn't find it.

I am aware of the Header.exe tool but I can't seem to get any properties
exported usiing this and there is no object called Obj-Dist-Name available.

If I setup a csv file template with just the fields I need then I can do a
manual export from within Exchange Admiinistrator and that will export those
properties for all Mailboxes, but could I tell Exchange to do this from
code?

I've also had a look at CDO but can't find any Folder property which
resembles the Obj-Dist-Name  or DN.

Comment
Watch Question

Author

Commented:
Hi cquinn, yes cdolive.com has a wealth of knowledge, I was aware of it before Neo_mvps  mentioned it but it takes a while to find stuff. I will take a look at the page you mention, thanks

Commented:
Assuming that you have:  /o=Timeframe Software Limited/ou=TIMEFRAME/cn=Recipients/cn=FREDE17FB984E17FB984E17FB984A025001C00AFD9

Then I would guess that you have a recipient or address entry object in your hot little hands.  The following values will help if you are working with the addressentry.fields collection object.

PR_EMS_AB_HOME_MTA
PR_EMS_AB_FOLDER_PATHNAME
PR_DISPLAY_NAME

Author

Commented:
No I have the Display Name 'Fred' and I want to get the DN or Obj-Dist-Name by using the Display Name. I just happen to know that the DN is /o=Timeframe Software Limited/ou=TIMEFRAME/cn=Recipients/cn=FREDE17FB984E17FB984E17FB984A025001C00AFD9 from looking it up in Exchange manually.

Author

Commented:
I tried the following:
 sAddressEntryID = oFolder.GetAddressEntry.Fields(PR_EMS_AB_HOME_MTA)
having defined PR_EMS_AB_HOME_MTA as:
Const PR_EMS_AB_HOME_MTA = &H8007001E
but no string is returned.

Author

Commented:
There's half a solution hear:
http://mlarchive.ima.com/mapi-l/2000/0703.html

Author

Commented:
Please leave this question open
bruintjeFreelance
CERTIFIED EXPERT
Top Expert 2006

Commented:
Hello nickwoolley

this question is open for more then 2 months
time to clean up
if not stated otherwise

my recom will be
-PAQ and refund
-this will be finalized by an EE Moderator
-with no further update (15.09.2002)

PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER

HAGD:O)Bruintje
posted by ToolzEE v1.0

Author

Commented:
It's still a problem I want to solve. I'd like to leave it open, it's on my list to resolve. Or could it be redated so it gets more attention, I'd be happy to double points to 150??

Commented:
Hello Nick,

you can put a new question on the list with a pointer to this one to attract attention

thanks
JGould-EE Moderator

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question,
PAQ/Refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Goldwing
EE Cleanup Volunteer
PAQ / Refund

SpazMODic
EE Moderator