Is it possible to make FIND part of screen appear when click on fo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have made a Public Folder as a knowledge base and would like to have the
FIND part of the screen that pops up when you click FIND, appear whenever you
open the public folder.

Is this possible?
 
Thankyou for your response, but I don't quite understand how that will help
me (Im sure Im being dense).

I would like the find section to popup when I click on the outlook bar icon
for the public folder, how do I link that with this?
 
I have found a piece of yoru coding which almost does it which is:-

Sub GoToFindContacts()
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objContacts As Outlook.MAPIFolder
Dim objExpl As Outlook.Explorer
Dim colCB As Office.CommandBars
Dim objFindCBB As Office.CommandBarButton

Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")

' display contacts as active folder
Set objExpl = objOL.ActiveExplorer
Set objContacts = objNS.GetDefaultFolder(olFolderContacts)
Set objExpl.CurrentFolder = objContacts

' get Find button, check its state and execute if not already active
Set colCB = objExpl.CommandBars
Set objFindCBB = colCB.FindControl(, 5592)
With objFindCBB
If .State = msoButtonUp Then
.Execute
End If
End With

Set objOL = Nothing
Set objNS = Nothing
Set objContacts = Nothing
Set colCB = Nothing
Set objFindCB = Nothing
Set objExpl = Nothing
End Sub

The only thing I can't seem to get it to do is having this in myVBAProject
to open up my public folder. Can you tell me how I can amend the code to open
a public folder please.

Thanks for your help.
 
To get a non-default folder, you need to walk the folder hierarchy using the Folders collections or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm

Once you have that folder, you set objExpl.CurrentFolder to the folder and proceed from there.

Note that this is different from what you originally asked about. If you want to write code to react to the user switching to the folder, use the Explorer.FolderSwitch event.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top