A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , , ,

Programmatically show or hide folder list pane





 
 
Thread Tools Display Modes
  #1  
Old June 13th 06, 02:45 PM posted to microsoft.public.outlook.program_vba
BenL712
external usenet poster
 
Posts: 4
Default Programmatically show or hide folder list pane

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  
Old June 13th 06, 10:25 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default Programmatically show or hide folder list pane

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  
Old June 14th 06, 02:06 PM posted to microsoft.public.outlook.program_vba
BenL712
external usenet poster
 
Posts: 4
Default Programmatically show or hide folder list pane

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  
Old June 14th 06, 03:13 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default Programmatically show or hide folder list pane

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 12:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Zappos Coupon - Xbox Mod Chip - Opel Manta - Personal Loan - Remortgage