Accessing mailbox with outlook library

  • Thread starter Thread starter =?iso-8859-1?Q?Stefan_Br=FChl?=
  • Start date Start date
?

=?iso-8859-1?Q?Stefan_Br=FChl?=

Hi!
I try to access mailboxes with the outlook library. But I
cannot access mailboxes, which are not stored in a local
mail profile!! I tried it with the namespace object, but
it didn't work.
Any ideas?


Thanx

Stefan
 
If you have permissions for the other mailboxes you can use
NameSpace.GetSharedDefaultFolder to do that on a folder by folder
basis.
 
Sorry for butting in here...but what is format for this? Can it be
used for Access trying to access tasks from a delegated mailbox/task
list?

Thanks,

O
 
It can be used from any Outlook automation code assuming you have the proper
permissions on that store and folder you want. Look in the Object Browser
for that function to see the arguments and a code snippet on how to use it.
 
Unfortunately, I am not familiar enough with the interface between
Access and Outlook. Could you be a bit more specific, please?

Thank you,

O
 
Did you look in the Object Browser for that?

Here's a code sample from the Object Browser showing getting a calendar
folder from GetSharedDefaultFolder:

Sub ResolveName()
Dim myOlApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myRecipient As Outlook.Recipient
Dim CalendarFolder As Outlook.MAPIFolder
Set myOlApp = CreateObject("Outlook.Application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myRecipient = myNamespace.CreateRecipient("Dan Wilson")
myRecipient.Resolve
If myRecipient.Resolved Then
Call ShowCalendar(myNamespace, myRecipient)
End If
End Sub

Sub ShowCalendar(myNamespace, myRecipient)
Dim CalendarFolder As Outlook.MAPIFolder
Set CalendarFolder = _
myNamespace.GetSharedDefaultFolder _
(myRecipient, olFolderCalendar)
CalendarFolder.Display
End Sub

You can just use a Tasks folder instead to get at the tasks in that folder.
 
Back
Top