Solved

Add a public folder calendar to multiple users' public folder favorite section

Posted on 2011-09-14
4
874 Views
Last Modified: 2015-02-09
Is it possible, via GPO or otherwise, to add a public folder calendar to a set of users' public folder favorites section? This way, when they all logon, they will be able to see the group calendar in their calendar section.

Thanks in advance.
0
Comment
Question by:d0uble0
4 Comments
 
LVL 13

Accepted Solution

by:
5g6tdcv4 earned 500 total points
ID: 36538298
you need to edit "strFolder = "Public Folders\All Public Folders\" & _
"Human Resources\Company Events"
To point to your public folder you want to add to users favorites....test on a user and then deploy using your method of choice


The script attached is from:
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
strFolder = "Public Folders\All Public Folders\" & _
"Human Resources\Company Events"
Call AddFolderToFavorites(strFolder, True)

Sub AddFolderToFavorites(strPath, AddToAddressBook)
Const olContactItem = 2
Set myFolder = GetFolder(strPath)
If Not myFolder Is Nothing Then
myFolder.AddToPFFavorites
' if contacts folder,
' optionally add new Favorite to OAB
If myFolder.DefaultItemType = olContactItem Then
If AddToAddressBook = True Then
strFavFolder = _
"Public Folders\Favorites\" & _
myFolder.Name
Set myFavFolder = GetFolder(strFavFolder)
If Not myFavFolder Is Nothing Then
myFavFolder.ShowAsOutlookAB = True
End If
End If
End If
End If
Set myFolder = Nothing
End Sub

Public Function GetFolder(strFolderPath)
On Error Resume Next
strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If
Set GetFolder = objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

Open in new window

0
 

Author Closing Comment

by:d0uble0
ID: 36556920
Thank you, that worked perfectly.
0
 
LVL 1

Expert Comment

by:WraithR32
ID: 37922658
Looks to be exactly what I am looking for but what sort of code is that (neither of the 2 links show this code and the second does not work at all).

How do you execute the code?

Cheers

Dave
0
 

Expert Comment

by:cokit
ID: 40599110
Please describe how and where you execute this code.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question