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.