Link to home
Start Free TrialLog in
Avatar of JWL5537
JWL5537

asked on

Is there a way to create a shortut to a public folder in Outlook 2007?

Is there a way to create a shortut to a public folder in Outlook 2007 mail view?  We have setup a public folder for outside customers to e-mail into.  I would like to create a shortcut folder and place it in each user's mailbox.  This way they are aware that new mail has arrived without having to be in folder view.
Avatar of David Lee
David Lee
Flag of United States of America image

Hi, JWL5537.

How about adding it to Favorite Folders?
Avatar of JWL5537
JWL5537

ASKER

Thanks for the reponse.  That would be ideal.  However, when right clicking and selecting add to favorites, it creates a favorites public folder and places it in there.  Any other thoughts?
Right-click the public folder favorite and select "Add to Favorites Folder".
There is no automated way to get the folder in to favourites that I am aware of. It is all client side and the settings are not exposed in any way that can be used to automate it.

Favourites is the only place that you can put a public folder and see new items have arrived.

Simon.
Adding a public folder to favorites can be automated.  Here's a VBA solution.  A VBScript version would probably be more useful since adding the code to Outlook requires more effort than adding the folder to favorites via the GUI.  I can convert this to VBScript if needed.
Sub AddPublicFolder2Favorites()
    Dim olkFolder As Outlook.Folder
    'Change the folder name on the next line'
    Set olkFolder = Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("My Folder")
    olkFolder.AddToPFFavorites
    'Change the folder name on the next line'
    Set olkFolder = OpenOutlookFolder("Public Folders\Favorites\My Folder")
    AddFavoriteFolder olkFolder
    Set olkFolder = Nothing
End Sub
 
Sub AddFavoriteFolder(olkFolder As Outlook.Folder)
    ' Purpose: Add a folder to Favorite Folders.'
    ' Written: 5/2/2009'
    ' Author:  BlueDevilFan'
    ' Outlook: 2007'
    Dim olkPane As Object, _
        olkModule As Object, _
        olkGroup As Object
    Set olkPane = Outlook.Application.ActiveExplorer.NavigationPane
    Set olkModule = olkPane.Modules.GetNavigationModule(olModuleMail)
    Set olkGroup = olkModule.NavigationGroups.GetDefaultNavigationGroup(olFavoriteFoldersGroup)
    olkGroup.NavigationFolders.Add olkFolder
    Set olkPane = Nothing
    Set olkModule = Nothing
    Set olkGroup = Nothing
End Sub
 
Function OpenOutlookFolder(strFolderPath As String) As Outlook.MAPIFolder
    ' Purpose: Opens an Outlook folder from a folder path.'
    ' Written: 4/24/2009'
    ' Author:  BlueDevilFan'
    ' Outlook: All versions'
    Dim arrFolders As Variant, _
        varFolder As Variant, _
        bolBeyondRoot As Boolean
    On Error Resume Next
    If strFolderPath = "" Then
        Set OpenOutlookFolder = Nothing
    Else
        Do While Left(strFolderPath, 1) = "\"
            strFolderPath = Right(strFolderPath, Len(strFolderPath) - 1)
        Loop
        arrFolders = Split(strFolderPath, "\")
        For Each varFolder In arrFolders
            Select Case bolBeyondRoot
                Case False
                    Set OpenOutlookFolder = Outlook.Session.Folders(varFolder)
                    bolBeyondRoot = True
                Case True
                    Set OpenOutlookFolder = OpenOutlookFolder.Folders(varFolder)
            End Select
            If Err.Number <> 0 Then
                Set OpenOutlookFolder = Nothing
                Exit For
            End If
        Next
    End If
    On Error GoTo 0
End Function

Open in new window

Avatar of JWL5537

ASKER

Again guys, when I right-click the public folder and choose favorites, it puts it in a public folder favorites folder, not the local one.  Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JWL5537

ASKER

Yep, you're right, thanks for all the help!
You're welcome.
This is the perfect solution for a problem that we have but none of the code works. Any chance you can rewrite this as VBS? As is, even w/ the expected modifications to folder paths every dim statement comes up at unexpected end of statement.

It would save me from going to 100 stations and adding the company public calendar to everyone's favorites.

Thanks.