Jump to content
xisto Community
Sign in to follow this  
EdgabtheGreat

Sharepoint Calendars Integrated Into Outlook 2007 Showing multiple Sharepoint Calendars in Outlook 2007 (Company wide De

Recommended Posts

Reason you would need to use this: If you have Multiple Sharepoint Calendars that you need to see side by side with your personal calendar in Outlook 2007. This tutorial is for company wide deployment.

post-67699-1221470064_thumb.jpg

 

Requirements: Outlook 2007, Sharepoint 3.0 or Sharepoint 2007, Active Directory (To control using Group policies).

 

Other: Will work with Outlook 2003 but will not update changes back to Sharepoint Calendar (Only one way: Sharepoint to Outlook 2003)

 

1) Create the Calendars

Create as many Calendars as you need on your Sharepoint site (this could be on diferent sites or even different sharepoint servers).

 

2) Download the MFCMapi tool

After creating Calendars on your Sharepoint site you will need to download a tool called MFCMapi (AKA MAPI Editor) from codeplex

Download Location: http://mfcmapi.codeplex.com/

-What this tool does: It is designed to follow the MAPI hierarchy. The intention was to make it easy to play around with the API and learn what you can or can't do. This UI also makes it easy for you to find the folder or item you want to work with.

 

3) Find the stssync URL for each sharepoint calendar.

On a PC running Outlook 2007 you will need to open the outlook calendar you have created previously on your sharepoint site. Click on actions and then on Connect to Outlook, this will add your sharepoint calendar into outlook. repeat this until you have all your calendars connected to outlook.

 

Open MFCMapi and click on session then on Logon and display store table. Double click on Sharepoint Lists. Expand Root Container then expand Top of Personal Folders. Right click on the Calendar you have connected to outlook and select Open Associated Contents Table. Click on the sharepoint item in the top window then find the stssync address in the bottom window eg. (stssync://sts/?ver=1.1&type=calendar&cmd=add-folder&base-url=http://forums.xisto.com/no_longer_exists/) save this stssync address somwhere for later use. Repeat this for each calendar you have connected to outlook.

 

4) Add stssync addresses into a group Group Policy for deployment.

Create a group policy in Group Policy Management Console (GPMC). Open group policy and add Outlk12.adm admin Template.

Available from: http://www.microsoft.com/en-us/download

Expand User Configuration, Administrative Templates, Microsoft Office Outlook 2007, Tools | Account Settings and Sharepoint.

Open Default Sharepoint lists click on Enabled and click on Show then click on add type in a name to be displayed for your Calendar then paste the corrisponding stssync address into the value field. Add each calendar to this list.

Open Do Not Rome Users' Sharepoint Lists and set it to Enabled.

 

5) Now link the group policy to the organisational unit that contains the users which will be using the calendar.

 

Challenges for users with roaming profiles.

Reasons you would need to add this functionality to your calendars: If you have users within your network who have roaming profiles and change PC's. When the user moves to a new PC the PST file for the Sharepoint List (Calendar) Sharepoint Lists.pst will be missing as it is on the previous PC where the Calendar was added.

Error Recieved: Sharepoint Lists.pst cannot be found

 

Location of pst file: C:\Documents and Settings\%user name%\Local Settings\Application Data\Microsoft\Outlook

 

Solution

I have created a script to be run on logon and on logoff that will copy the file Sharepoint Lists.pst on logoff to a shared folder on a file server located on the network and copy it from the shared folder to the correct location on the pc on logon.

 

This script has the built in checks to copy the Sharepoint lists.pst file in either location if it does not exist in one of those locations. You will need to edit the script to change the shared folder location.

 

Here it is:


'and then copy them back down to the pc on logon

'Solving the problem of sharepoint lists .pst files not following the roaming user

'You will need to run this script at logon and at logoff

'

'Notes linenums:0'>'The purpose of this script is to copy all pst files to a network location on logoff'and then copy them back down to the pc on logon'Solving the problem of sharepoint lists .pst files not following the roaming user'You will need to run this script at logon and at logoff''Notes:''* Manually Running Script' The script will not be able to copy the file while the PST file is in use' Please close down outlook before script is run '* Network Traffic' This will only copy files over the network if they do not exist at either locationDim fsaSet oShell = CreateObject("Wscript.Shell") Set objNetwork = CreateObject("Wscript.Network")Set fsa = CreateObject("Scripting.FileSystemObject")Set objFSA = CreateObject("Scripting.FileSystemObject")Set objFSO = CreateObject("Scripting.FileSystemObject")strUserProfile = oShell.ExpandEnvironmentStrings("%USERPROFILE%") strUser = objNetwork.UserNameIf objFSO.FolderExists(struserprofile & "\local settings\application data\microsoft\outlook\") Then 'Wscript.Echo "The Local folder exists: " & struserprofile & "\local settings\application data\microsoft\outlook\" If objFSO.FolderExists("\\Server\PSTFolder\" & struser) Then 'Wscript.Echo "The Remote folder exists: \\Server\PSTFolder\" & struser Set folder = fsa.getfolder("\\Server\PSTFolder\" & struser & "\") For Each File in Folder.Files If fsa.GetExtensionName(file)= "pst"Then set objfile = objfsa.getfile(file) 'wscript.Echo "This File " & objfile & " Exists in the " & folder & " Folder" if objfsa.fileExists(struserprofile & "\local settings\application data\microsoft\outlook\" & objFSA.GetFileName(objFile)) Then 'Wscript.Echo "File name: " & objFSA.GetFileName(objFile) & " File Already Exists at local destination. File not copied." Else FSA.CopyFile file, struserprofile & "\local settings\application data\microsoft\outlook\" & objFSA.GetFileName(objFile) 'Wscript.Echo "File name: " & objFSA.GetFileName(objFile) & " File does Not Exist at local destination. File copied." Found=vbTrue End If End If Next Set folder = fsa.getfolder(struserprofile & "\local settings\application data\microsoft\outlook\") For Each File in Folder.Files If fsa.GetExtensionName(file)= "pst"Then set objfile = objfsa.getfile(file) 'wscript.Echo "This File " & objfile & " Exists in the " & folder & " Folder" if objfsa.fileExists("\\Server\PSTFolder\" & struser & "\" & objFSA.GetFileName(objFile)) Then 'Wscript.Echo "File name: " & objFSA.GetFileName(objFile) & " File Already Exists at remote destination. File not copied." Else FSA.CopyFile file, "\\Server\PSTFolder\" & struser & "\" & objFSA.GetFileName(objFile) 'Wscript.Echo "File name: " & objFSA.GetFileName(objFile) & " File does Not Exist at destination. File copied." Found=vbTrue End If End If Next Else 'Wscript.Echo "The Remote folder does not exists: \\Server\PSTFolder\" & struser & " The Remote folder will now be Created" Set objFolder = objFSO.CreateFolder("\\Server\PSTFolder\" & struser) Set folder = fsa.getfolder(struserprofile & "\local settings\application data\microsoft\outlook\") For Each File in Folder.Files If fsa.GetExtensionName(file)= "pst"Then set objfile = objfsa.getfile(file) FSA.CopyFile file, "\\Server\PSTFolder\" & struser & "\" & objFSA.GetFileName(objFile) 'Wscript.Echo "File name: " & objFSA.GetFileName(objFile) & " File copied to remote folder" Found=vbTrue End If Next End IfElse 'Wscript.Echo "The Local folder does not exist: " & struserprofile & "\local settings\application data\microsoft\outlook\" If objFSO.FolderExists("\\Server\PSTFolder\" & struser) Then 'Wscript.Echo "The Remote folder exists: \\Server\PSTFolder\" & struser & " The Local Folder will now be created" Set objFolder = objFSO.CreateFolder(struserprofile & "\local settings\application data\microsoft\outlook") Set folder = fsa.getfolder("\\Server\PSTFolder\" & struser &"\") For Each File in Folder.Files If fsa.GetExtensionName(file)= "pst"Then set objfile = objfsa.getfile(file) FSA.CopyFile file, struserprofile & "\local settings\application data\microsoft\outlook\" & objFSA.GetFileName(objFile) 'Wscript.Echo "File name: " & objFSA.GetFileName(objFile) & " File copied to Local Folder" Found=vbTrue End If Next Else 'Wscript.Echo "The Remote folder does not exists: \\Server\PSTFolder\" & struser End IfEnd If


Copy and paste this code into a .vbs file.

 

You can automate this vbs script with group policy by adding the script to Logon and Logoff within User Configuration, Windows Settings and Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.