correct execute call
(vlax-invoke-method wFnd "Execute" nil :vlax-false :vlax-false :vlax-true :vlax-false :vlax-false :vlax-true 1 :vlax-true nil 2)
That was the problem!
Didn't realise it was such big of a deal if all the arguments were not supplied for this
Execute method.
Thank you, ukrainian hacker!
This would be a valuable lesson for one who's trying to translate VBA macros to lisp.
I could be wrong, but you seem to be using regexp notation for working in Autocad. Try changing lines 32, 41 and 50 to match the original since you are working in Word.
I tried this with huge doubt and a small hope if it would work - the result was it didn't (like expected).
For instance the pattern "\[\[*\]\]" from the VBA macro, the literal translation for lisp would be: "\\[\\[*\\]\\]",
hence that
Find object in MS Word has similarity with the Regex object (since in regex the syntax would be the same).