![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: folder, hide, list, pane, programmatically, show |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to write some code that will automatically close the folder list
when I select the Calendar folder/view, and then show it again when I select something other than my Calendar. Here is what I have so far based on what I've found in VB help and this board: Dim myOlApp As Outlook.Application Public WithEvents myOlExp As Outlook.Explorer Public Sub Initialize_Handler() Set myOlExp = myOlApp.ActiveExplorer End Sub Private Sub myOlExp_FolderSwitch() Select Case myOlExp.CurrentFolder.Name Case "Calendar" myOlExp.ShowPane olFolderList, False Case Else myOlExp.ShowPane olFolderList, True End Select End Sub It appears I've followed all the instructions given (granted, that's not much), but I still cannot get this to work. Any help would be greatly appreciated. Thanks! |
| Ads |
|
#2
|
|||
|
|||
|
What version of Outlook? Here code like that toggles visibility of the
entire Navigation Pane. That's on Outlook 2003. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "BenL712" wrote in message ... I'm trying to write some code that will automatically close the folder list when I select the Calendar folder/view, and then show it again when I select something other than my Calendar. Here is what I have so far based on what I've found in VB help and this board: Dim myOlApp As Outlook.Application Public WithEvents myOlExp As Outlook.Explorer Public Sub Initialize_Handler() Set myOlExp = myOlApp.ActiveExplorer End Sub Private Sub myOlExp_FolderSwitch() Select Case myOlExp.CurrentFolder.Name Case "Calendar" myOlExp.ShowPane olFolderList, False Case Else myOlExp.ShowPane olFolderList, True End Select End Sub It appears I've followed all the instructions given (granted, that's not much), but I still cannot get this to work. Any help would be greatly appreciated. Thanks! |
|
#3
|
|||
|
|||
|
Outlook 2000. I should also say that a while back I had some code that
accomplished this quite well, but something happened and I've lost the file. Unfortunately I can't remember exactly how I got this to execute. "Ken Slovak - [MVP - Outlook]" wrote: What version of Outlook? Here code like that toggles visibility of the entire Navigation Pane. That's on Outlook 2003. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "BenL712" wrote in message ... I'm trying to write some code that will automatically close the folder list when I select the Calendar folder/view, and then show it again when I select something other than my Calendar. Here is what I have so far based on what I've found in VB help and this board: Dim myOlApp As Outlook.Application Public WithEvents myOlExp As Outlook.Explorer Public Sub Initialize_Handler() Set myOlExp = myOlApp.ActiveExplorer End Sub Private Sub myOlExp_FolderSwitch() Select Case myOlExp.CurrentFolder.Name Case "Calendar" myOlExp.ShowPane olFolderList, False Case Else myOlExp.ShowPane olFolderList, True End Select End Sub It appears I've followed all the instructions given (granted, that's not much), but I still cannot get this to work. Any help would be greatly appreciated. Thanks! |
|
#4
|
|||
|
|||
|
Does this work in the Immediate window of the Outlook VBA project:
Application.ActiveExplorer.ShowPane olFolderList, False If you click Enter on it? If you use the BeforeFolderSwitch event and set myOlExp to the NewFolder object passed in that event handler before you toggle the folder list does it work? I see nothing that updates that object once it's set to the original ActiveExplorer. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "BenL712" wrote in message ... Outlook 2000. I should also say that a while back I had some code that accomplished this quite well, but something happened and I've lost the file. Unfortunately I can't remember exactly how I got this to execute. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Address Cards view doesnt show in folder list in OL2003 | Del | Outlook - Using Contacts | 5 | June 13th 06 09:21 PM |
| How do i show the slide bar at the bottom of the Navigation Pane? | BrianB | Outlook - Installation | 0 | May 30th 06 07:09 PM |
| How to programmatically save all email attachments in a folder | Brian Beck | Outlook and VBA | 1 | April 20th 06 02:47 PM |
| Optionally only show folders w/ new msgs in Outlook Folder List | Nikolai Devereaux | Outlook - Installation | 1 | February 16th 06 06:03 PM |
| how do I show the subject but hide the text of a meeting ? | debbied | Outlook - Calandaring | 0 | February 7th 06 03:07 PM |