Looking for relevant Microsoft Windows Whitepapers? Visit the SearchEnterpriseDesktop.com Research Library.
RoninV
145 pts. | Jul 9 2008 9:38PM GMT
In an Exchange environment, each user (by default) has Exchange as its default Email account, but I’m not looking at emails. I want to change a user’s default calendar to one of the public calendars. If this is possible (Outlook 2007, Vista, Exchange 2003), the users calendar views (To- Do Bar, etc.) will be focused on that user’s public calendar (folder) not the user’s personal calendar.
Schmidtw
9790 pts. | Jul 10 2008 3:06PM GMT
There is no standard feature in Outlook that will let you do this. You will have to do some VB/VBA/VBScript programming to accomplish this task.
Here is some sample code:
Set MyFolder = GetFolder(”Public Folders\All Public Folders\DDD\DDD Calendar”).Items Public Function GetFolder(strFolderPath As String) As MAPIFolder ‘ strFolderPath needs to be something like ‘ “Public Folders\All Public Folders\Company\Sales” or ‘ “Personal Folders\Inbox\My Folder” Dim objApp As Outlook.Application Dim objNS As <a href="http://Outlook.Name" title="http://Outlook. " target="_blank">Outlook.Name</a>Space Dim colFolders As Outlook.Folders Dim objFolder As Outlook.MAPIFolder Dim arrFolders() As String Dim I As Long On Error Resume Next strFolderPath = Replace(strFolderPath, “/”, “\”) arrFolders() = Split(strFolderPath, “\”) Set objApp = 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
And here is a site with a bit more information on the subject as I am no expert on VB/VBA/VBScript programming:
Schmidtw
9790 pts. | Jul 10 2008 3:08PM GMT
the link didn’t show:
<a href="http://www.outlookcode.com/d/code/getfolder.htm" title="http://www.outlookcode.com/d/code/getfolder.htm" target="_blank">http://www.outlookcode.com/d/code/getfol…</a>