-Brian

Using Outlook 2007 and VSTO 2005 for Office 2007 writing in c#

How do I set a Folder object to a private folder

currently I am runing fine using code like:

Outlook.Folder outFolder= Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSyncIssues) as Outlook.Folder;

But I do not see where I can set it to a private folder path.

Also, I would like for this addin to run at a specific time interval like once a night. Could someone share how to do this

Thanks,

Brian



Re: Visual Studio Tools for Office Outlook private folders

Sue Mosher - Outlook MVP

What do you mean by a "private folder path"



Re: Visual Studio Tools for Office Outlook private folders

-Brian

Sorry what I meant is a personal folder. So lets say I want to get a list of email subjects in the following Personal Folder...

Personal Folders/Brian/Emails

How would I get a list of emails in that personal folder

Thanks,

-Brian





Re: Visual Studio Tools for Office Outlook private folders

Sue Mosher - Outlook MVP

Walk down the folder hierarchy with the name of each folder. The Namespace object and each MAPIFolder/Folder object has a Folders collection of its subfolders.Start at the Namespace.Folders collection and get each folder by name from the Folders.Item method.



Re: Visual Studio Tools for Office Outlook private folders

DeborahK

Hi Sue -

I am walking down the folder hierarchy, but am not getting the folders in the same order as shown in Outlook. Any idea why

Is there a property or something I can use to ensure my folder hierarchy matches that shown in Outlook