I want to change the color from specific text with find and replace in a macro. I tried that with “record macro”, but in this mode, the colorchance is not recorded.
So, what do i have to put into the macro for changing the color?
Here is how it looks until now.
sub rot_vokal
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(18) as new com.sun.star.beans.PropertyValue
args1(10).Name = "SearchItem.SearchString"
args1(10).Value = "ָ"
args1(11).Name = "SearchItem.ReplaceString"
args1(11).Value = "ָ"
args1(17).Name = "SearchItem.Command"
args1(17).Value = 3
args1(18).Name = "Quiet"
args1(18).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1())
end sub