annotation hide annotation annotations Matthias Prem How can I hide existing annotations? /* HideAnnotations.rex */ /* Macro */ /* hide existing annotations */ /* get the script context and the desktop */ xScriptContext=uno.getScriptContext() xDesktop=xScriptContext~getDesktop /* get the current component (the Writer) and the controller from the xModel */ xComponent = xDesktop~getCurrentComponent() xModel = xComponent~{%see com.sun.star.frame.XModel%xModel} xController = xModel~getCurrentController() /* the XViewSettings is part of the xSelectionSupplier */ xSelectionSupplier = xController~{%see com.sun.star.view.XSelectionSupplier%XSelectionSupplier} xViewSettingsSupplier = xSelectionSupplier~{%see com.sun.star.view.XViewSettingsSupplier%XViewSettingsSupplier} xViewSettings=xViewSettingsSupplier~ViewSettings /* get the property set for the current view and hide the annotations*/ xViewProperties = xViewSettings~{%see com.sun.star.beans.XPropertySet%XPropertySet} xViewProperties~setPropertyValue("ShowAnnotations", box("boolean", .false)) ::requires UNO.CLS Initial version