* Mathias Bauer <[EMAIL PROTECTED]> [021206, 15:39]:
> SteveC wrote:
> 
> > Found it
> > 
> > Document.close(true)
> > 
> 
> close(true) will close the document if possible. If it isn't possible
> (e.g. because the document is still printing) it will close itself
> immediately if it will be so.
> 
> Ciao,
> Mathias
> 

May I come in this issue to clarify some doubts?
I wonder what happens in your xterm (supposing you're using OO in
GNU/Linux) when you run the macro. In mine, that command exits OO, but a
'ps | grep soffice.bin' shows that there are still a few pids around.
AAMOF the program is still wandering behind the scene: the prompt in
xterm is not returned until I press CTRL+C and even after that, the pids
are still open.

This is my testing macro:

---------------------------------
sub closeOO
dim document   as object
dim dispatcher as object

document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())
document.close(true)

end sub
---------------------------------

Regards,
        Ennio.

-- 
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to