Close dialog with a macro

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Fraz627
Posts: 22
Joined: Sat Jun 17, 2017 8:31 am

Close dialog with a macro

Post by Fraz627 »

I've searched but maybe I'm missing something. How do you close a dialog using a macro (that will be attached to a command button on the dialog box)
thanks
Open Office 4.1 on Windows 10
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: close dialog with a macro

Post by UnklDonald418 »

On the General tab of the CommandButton Properties Dialog you should see a Button Type property.
OK closes the Dialog and returns a result.
For that matter so does Cancel.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: close dialog with a macro

Post by UnklDonald418 »

You can also close the Dialog with the endDialog() method.
http://www.openoffice.org/api/docs/comm ... #endDialog
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply