Solved

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

Posted on 2011-09-14
4
818 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
Comment Utility
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
Comment Utility
Thank you, that worked perfectly.
0
 
LVL 1

Expert Comment

by:WraithR32
Comment Utility
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
Comment Utility
Please describe how and where you execute this code.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This video discusses moving either the default database or any database to a new volume.
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: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now