Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / December 2006

Tip: Looking for answers? Try searching our database.

Oulook - Switch To Unread Mail Folder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
elziko - 05 Dec 2006 12:48 GMT
I'm writing an Outlook Addin and I'd like to be able to force Outlook to
switch to the Unread Mail folder - anyone know how I'd do this?

TIA
Ken Slovak - [MVP - Outlook] - 05 Dec 2006 14:25 GMT
Get a handle to that folder as a MAPIFolder object and use
ActiveExplorer.CurrentFolder = oFolder where oFolder is 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

> I'm writing an Outlook Addin and I'd like to be able to force Outlook to
> switch to the Unread Mail folder - anyone know how I'd do this?
>
> TIA
elziko - 05 Dec 2006 17:02 GMT
> Get a handle to that folder as a MAPIFolder object and use
> ActiveExplorer.CurrentFolder = oFolder where oFolder is that folder.

Thanks, but is the 'Unread Mail' folder a MAPIFolder? If I look through
every folder in Application.Session.Folders I don't seem to see it there. Do
you know how to get a handle to that folder?

TIA
Ken Slovak - [MVP - Outlook] - 05 Dec 2006 19:01 GMT
Is this a search folder?

You can get to the Search Folders but except for Outlook 2007 you can't do
it from the Outlook object model. You would need to use CDO 1.21 or Extended
MAPI (C++ or Delphi), neither of which is supported for use in .NET code or
a MAPI COM wrapper such as Redemption (www.dismastr.com/redemption).

Outlook 2007 is the first object model for Outlook that let's you get to the
Stores collection and down from there to the search folders.

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

>> Get a handle to that folder as a MAPIFolder object and use
>> ActiveExplorer.CurrentFolder = oFolder where oFolder is that folder.
[quoted text clipped - 4 lines]
>
> TIA
elziko - 06 Dec 2006 11:16 GMT
> Outlook 2007 is the first object model for Outlook that let's you get
> to the Stores collection and down from there to the search folders.

Yes, I'm using Outllok 2007 and I've now managed to get a reference to all
my Serach Folders, thanks for your help!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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.