JackPollack
Senior Member
- Outlook version
- Email Account
- Exchange Server
Trying to write a small VBA macro for OL2003 that always opens the SearchBar when in a contact folder. I am putting my code in the FolderSwitch event.
I am able to find the ID of the SearchBar in the menu, but cant find a property to tell if it is already showing (.visible always returns true, even if not showing). Is there a way to figure out the view state as my code is toggling the state.
Set objCBCtl = Application.ActiveExplorer.CommandBars.FindControl(ID:=5592)
objCBCtl.Execute
Also as I side question, a client asked my and I couldn't answer, when the SearchBar is showing and you type in some text why soemtimes do you have to hit enter once to start the search and other times hit it 2 or 3 times? I have had the same problem, but cant figure out if it is a focus issue or something else.
I am able to find the ID of the SearchBar in the menu, but cant find a property to tell if it is already showing (.visible always returns true, even if not showing). Is there a way to figure out the view state as my code is toggling the state.
Set objCBCtl = Application.ActiveExplorer.CommandBars.FindControl(ID:=5592)
objCBCtl.Execute
Also as I side question, a client asked my and I couldn't answer, when the SearchBar is showing and you type in some text why soemtimes do you have to hit enter once to start the search and other times hit it 2 or 3 times? I have had the same problem, but cant figure out if it is a focus issue or something else.