msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Outllok favorites view

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook
Author Message
Mueller-Lynch Thomas



Joined: 07 Feb 2008
Posts: 1

PostPosted: Thu Feb 07, 2008 6:40 am    Post subject: Outllok favorites view Reply with quote

HI,

with the following code I can add a folder to the favorites view:
Dim myOlApp As New Outlook.Application
Dim myNS As Outlook.NameSpace
Set myNS = myOlApp.GetNamespace("MAPI")
Set myAPF = myNS.Folders("Public Folders").Folders("All Public Folders")
myAPF.Folders("Shared Contacts").AddToPFFavorites

How can I list all the folders stored within that view at the moment?
Could you please send me a smal script?

Thanks

Archived from group: microsoft>public>office>developer>outlook>vba
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Thu Feb 07, 2008 2:43 pm    Post subject: Re: Outllok favorites view Reply with quote

Set myAPF = myNS.Folders("Public Folders").Folders("Favorites")

That will get you to Favorites. Get the Folders collection of Favorites and
iterate that collection to list all folders in Favorites.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Mueller-Lynch Thomas" wrote
in message @microsoft.com...
> HI,
>
> with the following code I can add a folder to the favorites view:
> Dim myOlApp As New Outlook.Application
> Dim myNS As Outlook.NameSpace
> Set myNS = myOlApp.GetNamespace("MAPI")
> Set myAPF = myNS.Folders("Public Folders").Folders("All Public Folders")
> myAPF.Folders("Shared Contacts").AddToPFFavorites
>
> How can I list all the folders stored within that view at the moment?
> Could you please send me a smal script?
>
> Thanks
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group