OO-Snippets: How to close the quickstarter under Windows

Commons

KeywordsQuickstarter, Close, Windows, API Windows
LanguageOOBasic
ApplicationOffice
AuthorsDidier Dorange-Pattoret (initial)
Supported Versions2.0.x  
Supported OSWin32  
QuestionIs there another way to terminate the OOo process even if the QS is running beside Office.HowToCloseTheQuickstarterUnderWindows.snip
Answer

Yes you can issue a shell command like openoffice2.0\program\quickstart - killtray

Code-Snippet-Listing (snippet-source)

Sub CloseQuickstarter
	LeChemin = GetRepertoirePath("prog")&"\quickstart.exe -killtray"
	Shell(LeChemin)
End Sub

Function GetRepertoirePath(sInstPath as String) as String 'donne le répertoire correspondant
Dim  oPathSubstSrv as Object
Dim sPath as String
	sInstPath = "$("+sInstPath+")"
  oPathSubstSrv = createUnoService("com.sun.star.comp.framework.PathSubstitution")
  sPath = ConvertFromUrl(oPathSubstSrv.getSubstituteVariableValue(sInstPath))
	GetRepertoirePath = sPath
End Function

Changelog

DateUserModification
2006-03-06ddorangeInitial version

and