| View previous topic :: View next topic |
| Author |
Message |
Guest Guest
|
Posted: Mon Aug 18, 2003 12:12 am Post subject: Can't execute Quit-Command |
|
|
I am trying to call the following sub in a macro:
| Code: | sub QuitWithoutSaving
rem define variables
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:Quit", "", 0, Array())
end sub |
It is assigned to a botton in the function bar. As long as this sub is defined as under a module in the soffice-libraries it works fine. If it resides in a Module of a document library, it can't be executed anymore. I could execute other commands but not the Quit-command. Does anybody have an explanation or even a workaround for this? |
|
| Back to top |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Mon Aug 18, 2003 1:01 am Post subject: |
|
|
Work around...I will leave the explanation to someone else!
| Code: | Sub Main
thiscomponent.close(false)
End Sub |
|
|
| Back to top |
|
 |
Guest Guest
|
Posted: Mon Aug 18, 2003 1:11 am Post subject: |
|
|
Thanks! |
|
| Back to top |
|
 |
|