How do I close the Development Tools window if open. The Code below seems to toggle the window; so if closed it opens it, and if open it closes it. When I run the macro I just need the window closed regardless.
Sub CloseDevelopmentWindow
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "DevelopmentToolsDockingWindow"
args1(0).Value = false
dispatcher.executeDispatch(document, ".uno:DevelopmentToolsDockingWindow", "", 0, args1())
end sub