How to suppress search results in a macro?

A macro includes a couple search and replace steps. It works, but it always displays the search results as it proceeds. It shows the “Show this dialog”, and I uncheck it but that doesn’t do anything. I don’t need/want that.

I’ve looked on/off for a couple days how to suppress it, but I can’t find anything. I don’t want to build my own dialogue box.

This is in calc, if that matters.
LO 7.1.2.2(x64)

Update:
Placing this code before the search/replace steps suppressed it in my working file.

dim argsBS2OC2(0) as new com.sun.star.beans.PropertyValue
argsBS2OC2(0).Name = “Visible”
argsBS2OC2(0).Value = false

dispatcher.executeDispatch(document, “.uno:SearchResultsDialog”, “”, 0, argsBS2OC2())

And then I tried it in a different file, and it didn’t suppress it.

Please see your code. Is there a line (or two) of this kind?

WrongLine.png

Just remove or comment it out.

I left the previous comment just to make sure you ask about the “dispatcher script” instead real “macro”. My recommendation remains the same - comment out or thru out the specified line as well as all other lines between Sub and End Sub and paste in their place the code using .createReplaceDescriptor and .ReplaceAll - this will solve your problem. There are many code samples on the Internet. For example, the code is @JohnV1.