Ken:
I'm trying the following code to access the addressbook and the delegates
property. The code (with MAPI.Session) is running and I can able to select
entry from addressbook.I'm trying to access these properties
PR_EMS_AB_PUBLIC_DELEGATES &H8015000D
PR_EMS_AB_PUBLIC_DELEGATES_BL &H8110101E
PR_EMS_AB_PUBLIC_DELEGATES_BL_O &H8110000D
using Fields(prop) which returns nothing. Could u pls help me?
Code snippet:
Set objOutlook1 = CreateObject("Outlook.Application")
outlookObj.Application.ActiveExplorer.WindowState = 1 'Minimize
window
objOutlook1.ActiveExplorer.Activate()
Set olemSession = objOutlook1.CreateObject("MAPI.Session")
ReturnCode = olemSession.Logon( "", "", False, False, 0 )
Set myUser = olemSession.CurrentUser
objOutlook1.Application.ActiveExplorer.WindowState = 0
objOutlook1.ActiveExplorer.Activate()
Set colCDORecips = olemSession.AddressBook(Nothing,"Select
Recipients Names", False, True, 1,"To")
ScError=CStr(Err.number)
if StrComp(ScError,"-2147219963",1) = 0 then
mVar=MsgBox("Outlook is not running.",vbCritical,"Error")
exit function
end if
count=colCDORecips.Count
for i2003 = 1 to count
set entry=colCDORecips.Item(i2003)
MsgBox("DisplayType " & entry.AddressEntry.DisplayType)
MsgBox(TypeName(entry.AddressEntry))
if entry.AddressEntry.Type = "EX" then
set delegEntries=entry.AddressEntry.Fields(&H8015000E)
MsgBox TypeName(delegEntries)
MsgBox delegEntries
set delegEntries=entry.AddressEntry.Fields(&H8110000E)
MsgBox TypeName(delegEntries)
MsgBox delegEntries
set delegEntries=entry.AddressEntry.Fields(&H8110101F)
MsgBox TypeName(delegEntries)
MsgBox delegEntries
end if
.....
-Kalyan