PDA

View Full Version : Outlook.Namespace



jw123456789
03-23-2011, 04:57 PM
Hi,

I have a list of recipients that I monitor the inbox for.

I am using this code:

Dim oApp As Outlook.Application
Dim oNs As Outlook.Namespace
Dim oRecip As Outlook.Recipient
Dim oFolder As Outlook.Folder

Set oApp = CreateObject("Outlook.Application")
Set oNs = oApp.GetNamespace("Mapi")
Set oRecip = oNs.CreateRecipient(rstRead!mailBoxName)

Set oFolder = oNs.GetSharedDefaultFolder(oRecip, olFolderInbox)

Once I lock onto the inbox I do a range if things.

This works for lots of Microsoft Exchange inboxes that I have added for the purpose of gathering information about the emails in this box.

Except for 1.

The inbox name and alias's I have been given are:

Inbox/alias: FRED SMITH Business Unit / 2FredSmithBusinessUnitarchive
Inbox/alias: 2FRED SMITH Business Unit / FREDSMITHBusinessUnit

Obviously there has been some change or linking to archive activity for this inbox.

The problem is that only the string in red latches on to an inbox. And that is not the inbox I am looking to latch onto. The other one is the one I am after I would assume.

Is there any other reference that I can use to get at an recipient for the purpose of reading the inbox other than the inbox name and alias?

Is there any other advice you can give me?

Thanks,
J