Hi.
I’ve been struggeling for a while on a simple script : opening the spell check, and (as soon as the dialog is closed),
from a script, save, and close the document.
Pretty much like this, in MSOffice’s BASIC
(I’m trying to get rid of it, and spending a few days in translating scripts into LO’s) :
Application.Dialogs(wdDialogToolsSpellingAndGrammar).Show
Application.Quit SaveChanges:=True
First try with a macro recorder gave me something like that :
dispatcher.execute(document, ".uno:SpellingAndGrammarDialog", "", 0, Array())
dispatcher.execute(document, ".uno:Save", "", 0, Array())
dispatcher.execute(document, ".uno:Close", "", 0, Array())
But the dispatcher seems to launch everyting on a separate thread.
The “Spell” and “Save” seems to be interrupted by the “Close”.
dispatcher.execute(document, ".uno:SpellingAndGrammarDialog", "", 0, Array())
ThisComponent.store()
ThisComponent.close(True)
Now the “Save” and “Close” are synchronized, but the SpellCheck doesn’t have time to pop up.
So, the question(s) :
Is there a non-dispatcher way to call the SpellingAndGrammarDialog ?
-OR- Is there a way to wait for a dispatcher task’s end / existing dialog’s closing in BASIC ?
Cheers.