Windows Tips

From Apache OpenOffice Wiki
Revision as of 13:40, 2 October 2007 by Fpe (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Closing the Windows quickstarter from a macro

There seems to be no obvious way to close quickstart.exe (the OOo icon in the system tray) using UNO. Indeed, "quickstart -killtray" itself does it by searching the running system processes for one with the correct name and path. The following Basic snippet is a work-round that is OK for some purposes:

 sub KillQuickstarter()
     ' Runs "quickstart -killtray"
     subst = CreateUnoService("")
     quickstartPath = subst.substituteVariables("$(prog)/quickstart", 1)
     shell(quickstartPath, 0, "-killtray")
 end sub
Personal tools