>Hello,
>
>I have to access the e-mail INBOX of another user assuming I have all the rights. I have the user's name and I'm using Microsoft Exhange.
>
>I'm using the following code so far :
>
>oApp = CreateObject("Outlook.Application")
>olNameSpace = oApp.GetNameSpace("MAPI")
>oInbox = olNameSpace.GetDefaultFolder(6).Items
>
>Can anyone help please ???
GetDefaultFolder only works within the current user's Folder collection. In order to go outside of that, you need to use the GetSharedDefaultFolder method of the Namespace object. Ex.
#define olFolderInbox 6
oapp = createobject('Outlook.application')
ons = oapp.GetNamespace('MAPI')
orecipient = ons.CreateRecipient("SomeUserNameHere")
if orecipient.Resolve() then
ofolder = ons.GetSharedDefaultFolder(orecipient,olFolderInbox)
endif
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao