Listing Folders?

  • Thread starter Thread starter Linn Kubler
  • Start date Start date
L

Linn Kubler

Hi,

Is there a way to list the folders in my mail box using VBA? Anyone know of
any good sites with examples for simple tasks like this or an online (read
free) tutorial on how to program Outlook with VBA? BTW, I'm using Outlook
2002 if that makes a difference.

Thanks in advance,
Linn
 
Hi Linn,

good sites for starting:
www.outlookcode.com.
www.slipstick.com

List the folders of your Inbox from within OL-VBA:

dim oFld as Outlook.Mapifolder
dim Inbox as Outlook.Mapifolder

set Inbox=Application.Session.GetDefaultFolder(onFolderInbox)
for each ofld in Inbox.Folders
Debug.Print oFld.name
next
 
Do you know where I can find some code for accessing my shared folders? code
below will only display my contact folder not the contact folders that
someone is sharing with me.

I have looked everywhere and cannot find any documentation on how to do
this.

Thanks
 
The function is called GetSharedDefaultFolder, also available via the
NameSpace object.
 
How do I get a listing of all the Mailboxes that are being shared with me?
Meaning, in code I want to grab the username of all the shared Mailboxes (I
could have 3 or 4) and then display this listing to the user to allow them to
pick from. Is this possible?
 
I don´t have Exchange installed. I suppose all folders that are not
below your personal folder are the shared folders?
 
Ok, thanks I'll check out those sites and got the code working. But how do
I reference the top of the folder tree? In my case I have multiple email
accounts configured. One of which is an IMAP attachment to an account. All
the examples I've seen so far assume you want to work out of the default
Inbox.

Thanks Again!
Linn
 
Back
Top