Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / March 2007

Tip: Looking for answers? Try searching our database.

Accessing mailbox with outlook library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stefan Brühl - 07 Oct 2003 14:34 GMT
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
Ken Slovak - [MVP - Outlook] - 07 Oct 2003 15:51 GMT
If you have permissions for the other mailboxes you can use
NameSpace.GetSharedDefaultFolder to do that on a folder by folder
basis.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi!
> I try to access mailboxes with the outlook library. But I
[quoted text clipped - 6 lines]
>
> Stefan
The Facilitator - 29 Mar 2007 18:16 GMT
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

>If you have permissions for the other mailboxes you can use
>NameSpace.GetSharedDefaultFolder to do that on a folder by folder
>basis.
Ken Slovak - [MVP - Outlook] - 29 Mar 2007 21:14 GMT
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.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> 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
[quoted text clipped - 7 lines]
>>NameSpace.GetSharedDefaultFolder to do that on a folder by folder
>>basis.
The Facilitator - 30 Mar 2007 03:26 GMT
Unfortunately, I am not familiar enough with the interface between
Access and Outlook.  Could you be a bit more specific, please?

Thank you,

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.
Ken Slovak - [MVP - Outlook] - 30 Mar 2007 14:26 GMT
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.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Unfortunately, I am not familiar enough with the interface between
> Access and Outlook.  Could you be a bit more specific, please?
[quoted text clipped - 8 lines]
>>for that function to see the arguments and a code snippet on how to use
>>it.
The Facilitator - 30 Mar 2007 17:20 GMT
Thank you VERY much for the help.  

Forgot to ask, does this work in 2K2?

O

>Did you look in the Object Browser for that?
>
[quoted text clipped - 24 lines]
>
>You can just use a Tasks folder instead to get at the tasks in that folder.
Ken Slovak - [MVP - Outlook] - 30 Mar 2007 19:18 GMT
That code will work in any version of Outlook from 2000 to 2007.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Thank you VERY much for the help.
>
> Forgot to ask, does this work in 2K2?
>
> O
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.