Libreoffice Writer Macro Code to Set Regular Expression enabled

I created a macro which works as expected if there is tick on regular expression in the find and replace dialog box. My question is which macro code need to be added so that if there is no tick on regular expression, the macro code will enable it? I am using Ubuntu 14.04, 16.04, 18.04, LibreOffice 4.x to 6.x.

1 Like

Simplly inspect your document. It supports service LibreOffice: SpreadsheetDocumentSettings Service Reference

That’s not what they asked for though… the RegularExpressions property there “specifies whether regular expressions in formulas are enabled”, not setting the Find&Replace dialog’s regular expression checkbox.

https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XSearchable.html#a5e7b729c2d45dea6fa517b96e4e3feea

Create a search descriptor from the sheet in question and set the right properties.

2 Likes

Set Regular Expression On.odt (21.5 KB)