| View previous topic :: View next topic |
| Author |
Message |
ddorange General User

Joined: 29 Dec 2002 Posts: 13 Location: France
|
Posted: Fri Feb 10, 2006 2:09 pm Post subject: How to close the quicstarter |
|
|
Hello,
I would like under windows with macro
- to know if the quickstarter is launched,
- to close the quickstarter.
Is it possible ?
Thanks.  |
|
| Back to top |
|
 |
ddorange General User

Joined: 29 Dec 2002 Posts: 13 Location: France
|
Posted: Sat Feb 11, 2006 11:26 am Post subject: |
|
|
Hello,
When my mouse is on the quickstarter icon, i get "Démarrage rapide de OpenOffice.org 2.0" with my french version of OOo.
Can somebody tell me the english sentence.
Thank you. |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
ddorange General User

Joined: 29 Dec 2002 Posts: 13 Location: France
|
Posted: Mon Feb 20, 2006 2:45 am Post subject: |
|
|
May be the solution using windows API. The macro editor have to be closed.
Tested on WinXp.
| Code: |
Declare Function GetActiveWindow Lib "user32" () As Long
Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Sub Essai
rem getting the active window's handle.
hWnd = GetActiveWindow()
rem closing all active windows
On error resume Next
myEnum = StarDesktop.Components.CreateEnumeration
Do while myEnum.HasmoreElements
oDoc = myEnum.NextElement
If HasUnoInterfaces(oDoc, "com.sun.star.util.XCloseable") Then
oDoc.close(true)
Else
oDoc.dispose()
End If
Loop
On error goto 0
rem closing the quickstarter
ExitProcess(hWnd)
End Sub
|
Didier Dorange-Pattoret
http://www.dmaths.org |
|
| Back to top |
|
 |
|