How to close a calendar

S

sven preuske

Hi there!

with much help of this forum i got the following macro running:


Public Sub SchalteKalender()
Set objnameSpace = Application.GetNamespace("MAPI")
Set objRoomA = objnameSpace.CreateRecipient("Foreign Name")
objRoomA.Resolve
Set objRoomACalendar =
objnameSpace.GetSharedDefaultFolder(objRoomA, olFolderCalendar)
Set Application.ActiveExplorer.CurrentFolder = objRoomACalendar
Set objRoomATasks = Nothing
Set objRoomACalendar = Nothing
Set objRoomA = Nothing
End Sub

It opens a foreign calender and shows it. now my problem is: i dont
want to see my own calender/tasks. how can i just sho a specific
calender and its tasks and leave all other at that moment showed ones
out?
 
S

Sue Mosher [MVP-Outlook]

Is this Outlook 2003? Do you mean that you want to show only the other's users calendar without displaying it side-by-side with your own calendar?
 
S

sven preuske

Yes.. i think i found a way by using DeselectFolder .. now ive got
another problem: my script only works, when running in the
calender-view. is there a simple way to switch from tasks or contacts
to calender-view?
 
S

Sue Mosher [MVP-Outlook]

I don't know what you mean. If you set ActiveExplorer.CurrentFolder to a calendar folder, it will show that folder. If that's not working, show a code snippet that illustrates the problem.
 
Top