von Stephan » Mo, 20.04.2020 11:41
Durch Zufall
(*) habe ich eine Lösung selbst gefunden:
Code: Alles auswählen
sub Oeffne_CellStyleDialog_NewStyle()
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 args(0) as new com.sun.star.beans.PropertyValue
args(0).Name = "Family"
args(0).Value = 2
dispatcher.executeDispatch(document, ".uno:NewStyle", "", 0, args())
end sub
(*)
Durch Aufzeichenen des Klicks auf "Neue Vorlage ..." im Dialog Format-Bedingte Formatierung per MaKrorecorder stiess ich auf ".uno:NewStyle" und durch Aufzeichnen von "Neue Vorlage aus Selektion" stiess ich auf die Property "Family" und konnte dann, durch Probieren, Beides kombinieren.
Gruß
Stephan
Durch Zufall[color=#FF0000](*)[/color] habe ich eine Lösung selbst gefunden:
[code]
sub Oeffne_CellStyleDialog_NewStyle()
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 args(0) as new com.sun.star.beans.PropertyValue
args(0).Name = "Family"
args(0).Value = 2
dispatcher.executeDispatch(document, ".uno:NewStyle", "", 0, args())
end sub[/code]
[color=#FF0000](*)[/color]
Durch Aufzeichenen des Klicks auf "Neue Vorlage ..." im Dialog Format-Bedingte Formatierung per MaKrorecorder stiess ich auf ".uno:NewStyle" und durch Aufzeichnen von "Neue Vorlage aus Selektion" stiess ich auf die Property "Family" und konnte dann, durch Probieren, Beides kombinieren.
Gruß
Stephan