Export (0) Print
Expand All

Folder.AddToPFFavorites Method (Outlook)

Published: July 16, 2012

Adds a Microsoft Exchange public folder to the public folder's Favorites folder.

Version Added: Outlook 2007

expression .AddToPFFavorites

expression A variable that represents a Folder object.

The following Visual Basic for Applications (VBA) example adds the public folder GroupDiscussion to the user's Favorites folder by using the AddToPFFavorites method. To run this example, you need to replace 'GroupDiscussion' with a valid public folder name.

Sub AddToFavorites() 
 
 'Adds a Public Folder to the list of favorites 
 
 Dim objFolder As Outlook.Folder 
 
 Set objFolder = Application.Session.GetDefaultFolder _ 
 
 (olPublicFoldersAllPublicFolders).Folders.Item("GroupDiscussion") 
 
 objFolder.AddToPFFavorites 
 
End Sub

Community Additions

ADD
Show:
© 2014 Microsoft