Can I avoid Instant Search's drop down menu of suggestions

Mike VaughanEdwards 141 Reputation points
2021-05-20T16:29:39.84+00:00

I have added a query builder in a form that then triggers

olExplorer.Search(SearchText(), Outlook.OlSearchScope.olSearchScopeAllFolders);
this.Close();

It does exactly what I want except that Outlook insists on popping up a menu of search suggestions although the search has been carried out. I just want to see the search results without the pop-up menu.

I have tried using SendKeys various ways with ENTER, TAB and ESC but none have the desired effect.

Any suggestions?

Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,886 questions
{count} votes

Accepted answer
  1. Mike VaughanEdwards 141 Reputation points
    2021-05-22T10:34:27.947+00:00

    Thanks for the suggestion. For the record I figured it out. I was calling the Explorer.Search method from within the form I was displaying for the user to construct the query. When the user clicked the button on the form the search executed then the form close. The result was that the search results appeared straight away but the UI did not respond - hence the drop down menu of suggestions as though the search had not been executed.

    I changed things so that all the fork did was allow the user to construct the search query. When the user clicked the button the form closed and the Explorer.Search was then executed by code in the main add-in module. Suddenly things worked just as I expected.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful