PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Listing Folders?

Reply

Listing Folders?

 
Thread Tools Rate Thread
Old 06-11-2004, 09:21 PM   #1
Linn Kubler
Guest
 
Posts: n/a
Default Listing Folders?


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


  Reply With Quote
Old 07-11-2004, 08:30 AM   #2
Michael Bauer
Guest
 
Posts: n/a
Default Re: Listing Folders?

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


--
Viele Grüße
Michael Bauer


"Linn Kubler" <lkubler@charter2.net> wrote in message
news:OJFvZaExEHA.2196@TK2MSFTNGP14.phx.gbl...
> 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
>
>


  Reply With Quote
Old 07-11-2004, 03:51 PM   #3
=?Utf-8?B?U0RlY291?=
Guest
 
Posts: n/a
Default Re: Listing Folders?

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

"Michael Bauer" wrote:

> 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
>
>
> --
> Viele Grüße
> Michael Bauer
>
>
> "Linn Kubler" <lkubler@charter2.net> wrote in message
> news:OJFvZaExEHA.2196@TK2MSFTNGP14.phx.gbl...
> > 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
> >
> >

>
>

  Reply With Quote
Old 07-11-2004, 04:59 PM   #4
Michael Bauer
Guest
 
Posts: n/a
Default Re: Listing Folders?

The function is called GetSharedDefaultFolder, also available via the
NameSpace object.

--
Viele Grüße
Michael Bauer


"SDecou" <SDecou@discussions.microsoft.com> wrote in message
newsE169BFD-1288-4D45-9BCB-A790CFA10E5E@microsoft.com...
> 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


  Reply With Quote
Old 08-11-2004, 01:40 PM   #5
=?Utf-8?B?U0RlY291?=
Guest
 
Posts: n/a
Default Re: Listing Folders?

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?

"Michael Bauer" wrote:

> The function is called GetSharedDefaultFolder, also available via the
> NameSpace object.
>
> --
> Viele Grüße
> Michael Bauer
>
>
> "SDecou" <SDecou@discussions.microsoft.com> wrote in message
> newsE169BFD-1288-4D45-9BCB-A790CFA10E5E@microsoft.com...
> > 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

>
>

  Reply With Quote
Old 09-11-2004, 06:13 AM   #6
Michael Bauer
Guest
 
Posts: n/a
Default Re: Listing Folders?

I don´t have Exchange installed. I suppose all folders that are not
below your personal folder are the shared folders?

--
Viele Grüße
Michael Bauer


"SDecou" <SDecou@discussions.microsoft.com> wrote in message
news:6717D963-7DD0-4C69-AEDE-A54AC31771A2@microsoft.com...
> 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?
>
> "Michael Bauer" wrote:
>
> > The function is called GetSharedDefaultFolder, also available via

the
> > NameSpace object.
> >
> > --
> > Viele Grüße
> > Michael Bauer
> >
> >
> > "SDecou" <SDecou@discussions.microsoft.com> wrote in message
> > newsE169BFD-1288-4D45-9BCB-A790CFA10E5E@microsoft.com...
> > > 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

> >
> >


  Reply With Quote
Old 09-11-2004, 05:39 PM   #7
Linn Kubler
Guest
 
Posts: n/a
Default Re: Listing 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

"Michael Bauer" <mib00@t-online.de> wrote in message
news:e656LVKxEHA.2600@TK2MSFTNGP09.phx.gbl...
> 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
>
>
> --
> Viele Grüße
> Michael Bauer
>
>
> "Linn Kubler" <lkubler@charter2.net> wrote in message
> news:OJFvZaExEHA.2196@TK2MSFTNGP14.phx.gbl...
> > 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
> >
> >

>



  Reply With Quote
Old 10-11-2004, 05:46 AM   #8
Michael Bauer
Guest
 
Posts: n/a
Default Re: Listing Folders?

Hi Linn,

the top folders are available via Application.Session.Folders. You can
loop through the hierarchie or use Sue´s GetFolder function:
http://www.outlookcode.com/d/code/getfolder.htm

--
Viele Grüße
Michael Bauer


"Linn Kubler" <lkubler@charter2.net> wrote in message
news:ur#tcMoxEHA.2316@TK2MSFTNGP15.phx.gbl...
> 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
>
> "Michael Bauer" <mib00@t-online.de> wrote in message
> news:e656LVKxEHA.2600@TK2MSFTNGP09.phx.gbl...
> > 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
> >
> >
> > --
> > Viele Grüße
> > Michael Bauer
> >
> >
> > "Linn Kubler" <lkubler@charter2.net> wrote in message
> > news:OJFvZaExEHA.2196@TK2MSFTNGP14.phx.gbl...
> > > 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
> > >
> > >

> >

>
>


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off