Add Favorite Folders to Folder List view in Navigation Pane

B

Bill Hobson

I would like to create a Favorites Folder section at the top of the Folder
List pane in the Navigation Pane. Of course I hit a blank wall on the MS
Knowledge Base (sometimes I wonder why I even bother to search there). You
can right click anything you want and then click "add to my favorite
folders", but there isn't any such thing as a Favorites Folder by default on
the Folder List view of the Navigation Pane. Anyone know how to add one?
 
K

Ken Slovak - [MVP - Outlook]

Use the OutlookBar object with the Group "Shortcuts" and add whatever you
want there.

'pass in a MAPIFolder object to a procedure as objFolder
Dim colBarShortcuts As Outlook.OutlookBarShortcuts
Dim oBarShortcut As Outlook.OutlookBarShortcut
Dim oPane As Outlook.OutlookBarPane
Dim oGroup As Outlook.OutlookBarGroup
Dim blnAdd As Boolean

On Error Resume Next

Set oPane = olApp.Explorers.Item(1).Panes.Item("OutlookBar")
If Not (oPane Is Nothing) Then
Set oGroup = oPane.Contents.Groups.Item("Shortcuts")
If oGroup Is Nothing Then
Set oGroup = oPane.Contents.Groups.Add("Shortcuts")
End If

Set colBarShortcuts = oGroup.Shortcuts

blnAdd = True
For Each oBarShortcut In colBarShortcuts
If oBarShortcut.Name = objFolder.Name Then
blnAdd = False
Exit For
End If
Next

If blnAdd Then
colBarShortcuts.Add objFolder, objFolder.Name
End If
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top