Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You didn't mention your operating system, but I've done something on linux that may be adaptable. I kill all instances of openoffice (never tried on libreoffice) with a cron script and the wmctrl tool. You might start a bash script from your macro that does the same. You may need to detach it from the initiating process. It will kill all instances of openoffice.

export DISPLAY=:0  # may not be needed except with cron
until [ -z "$(pgrep soffice.bin)" ] #for all openoffice instances
do
/usr/bin/wmctrl -c openoffice 2> /dev/null #close all openoffice instances
done
/usr/bin/killall soffice.bin  #this line forces closed all docs left in an unclosed state, otherwise they pop up a save dialog.