Outlook Developer Home
Outlook Programmer's Library
 
Outlook Technologies
Outlook Forms
Languages
Samples
Other Technologies

 

 

To show the Find pane when you switch to a Contacts folder

This Outlook VBA code sample opens the Find pane when you switch to a folder holding contacts. To use it, place the code in the built-in ThisOutlookSession module in Outlook VBA, then restart Outlook. You can also download the code and import it into VBA, but you will have to cut and paste it manually to the ThisOutlookSession module

Code Sample

 Back to Top

Notes

Note the use of the FindControl method to return a CommandBarControl without the need to know what toolbar it's on. The ID for the Find button on the toolbar is 5592. If you don't want to write your own code to recurse the Explorer.CommandBars and Inspector.CommandBars collections, you can use various tools to get a list of IDs.

The main limitation of this approach is that it handles only the case where you use a single Explorer window to switch between folders. To handle multiple Explorer windows, you'd need a wrapper class module. Randy Byrne's Items Command Bar COM add-in sample shows how this is done.

More Information

   
2002-7 TurtleFlock, LLC
All right reserved.
About OutlookCode.com

Send comments to webmaster@outlookcode.com

Designed and Implemented by TerraLink USA 

FrontPage Integration
by RobsonDesignWorks

 
 
get Sue's code | forums | share your own code | registration