Folder inquiries

  • Thread starter Thread starter Dennis Brown
  • Start date Start date
D

Dennis Brown

If I am arrowing down the folder list, what would be the syntax for retrieving the current number of messages it contains, and the number of unread messages it contains?
Thanks for any assistance!
 
Application.ActiveExplorer.CurrentFolder (returns MAPIFolder)

MAPIFolder.Items.Count
MAPIFolder.UnReadItemCount

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

If I am arrowing down the folder list, what would be the syntax for
retrieving the current number of messages it contains, and the number of
unread messages it contains?
Thanks for any assistance!
 
Thanks a bunch! This is great!

--

Thanks,
Dennis
Application.ActiveExplorer.CurrentFolder (returns MAPIFolder)

MAPIFolder.Items.Count
MAPIFolder.UnReadItemCount

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

If I am arrowing down the folder list, what would be the syntax for
retrieving the current number of messages it contains, and the number of
unread messages it contains?
Thanks for any assistance!
 
What about when I'm moving through the folder list? How would I get the count and unread count of the folder currently highlighted? Would I use the Selection object somehow?

--

Thanks,
Dennis
Thanks a bunch! This is great!

--

Thanks,
Dennis
Application.ActiveExplorer.CurrentFolder (returns MAPIFolder)

MAPIFolder.Items.Count
MAPIFolder.UnReadItemCount

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

If I am arrowing down the folder list, what would be the syntax for
retrieving the current number of messages it contains, and the number of
unread messages it contains?
Thanks for any assistance!
 
Again, Application.ActiveExplorer.CurrentFolder. You cannot have more than
one folder selected, Selection collection only applies to thee messages.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

What about when I'm moving through the folder list? How would I get the
count and unread count of the folder currently highlighted? Would I use the
Selection object somehow?

--

Thanks,
Dennis
Thanks a bunch! This is great!

--

Thanks,
Dennis
Application.ActiveExplorer.CurrentFolder (returns MAPIFolder)

MAPIFolder.Items.Count
MAPIFolder.UnReadItemCount

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

If I am arrowing down the folder list, what would be the syntax for
retrieving the current number of messages it contains, and the number of
unread messages it contains?
Thanks for any assistance!
 
No, when I use that, it gives the count and unread count for the folder that is active, not the folder currently being highlighted in the folder list.
For instance, if I am in Inbox, and I have 15 messages, with 4 unread, then the method you gave gives me that info.
If I activate the folder list, and arrow down past Draft, Outbox, Sent Items, etc., the screen displays the number of messages in each folder as I arrow past it, but if I try to get the count and unread count with the CurrentFolder, it gives me the count for the Inbox, not the folder currently highlighted.
That was why I asked if the Selection object should be used instead, since I need the info from the currently highlighted folder, not the currently activated folder.
Thanks for the info on the other though! I've been able to use it in another situation.

--

Thanks,
Dennis
Again, Application.ActiveExplorer.CurrentFolder. You cannot have more than
one folder selected, Selection collection only applies to thee messages.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

What about when I'm moving through the folder list? How would I get the
count and unread count of the folder currently highlighted? Would I use the
Selection object somehow?

--

Thanks,
Dennis
Thanks a bunch! This is great!

--

Thanks,
Dennis
Application.ActiveExplorer.CurrentFolder (returns MAPIFolder)

MAPIFolder.Items.Count
MAPIFolder.UnReadItemCount

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

If I am arrowing down the folder list, what would be the syntax for
retrieving the current number of messages it contains, and the number of
unread messages it contains?
Thanks for any assistance!
 
When you use the arrow keys to navigate the folder treeview, the folders get
highlighted , but Outlook does not change anything in its UI until you
either hit the Return key or click on a folder with a mouse. At this point a
folder becomes selected, and Application.ActiveExplorer.CurrentFolder will
return the new folder.
There is no way to find out the highlighted folder using the Outlook Object
Model, you'd need to hook the folder treeview control for that.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

No, when I use that, it gives the count and unread count for the folder that
is active, not the folder currently being highlighted in the folder list.
For instance, if I am in Inbox, and I have 15 messages, with 4 unread, then
the method you gave gives me that info.
If I activate the folder list, and arrow down past Draft, Outbox, Sent
Items, etc., the screen displays the number of messages in each folder as I
arrow past it, but if I try to get the count and unread count with the
CurrentFolder, it gives me the count for the Inbox, not the folder currently
highlighted.
That was why I asked if the Selection object should be used instead, since I
need the info from the currently highlighted folder, not the currently
activated folder.
Thanks for the info on the other though! I've been able to use it in
another situation.

--

Thanks,
Dennis
Again, Application.ActiveExplorer.CurrentFolder. You cannot have more than
one folder selected, Selection collection only applies to thee messages.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

What about when I'm moving through the folder list? How would I get the
count and unread count of the folder currently highlighted? Would I use the
Selection object somehow?

--

Thanks,
Dennis
Thanks a bunch! This is great!

--

Thanks,
Dennis
Application.ActiveExplorer.CurrentFolder (returns MAPIFolder)

MAPIFolder.Items.Count
MAPIFolder.UnReadItemCount

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

If I am arrowing down the folder list, what would be the syntax for
retrieving the current number of messages it contains, and the number of
unread messages it contains?
Thanks for any assistance!
 
Back
Top