I’ve created a macro for a code block (alters selected paragraph style):
I also tried creating the same macro for in-line code (alters selected character style) but with no success - the macro doesn’t apply the border:
This is what I want the end result to be:
The macro doesn’t apply the border style to the selected characters. Even though it’s done through the same interface that I used for the paragraph styling.
Below is the macro code that is generated when adding a simple border around selected text.
Any ideas as to why the border doesn’t get applied?
sub addBorder
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 ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:BorderInner", "", 0, Array())
end sub