Page 1 of 1

[Solved] Shortcut for a specific Shape Type

PostPosted: Tue Feb 10, 2015 5:47 pm
by Yoshi_Ma
Hello

I am trying to add a keyboard shortcut for "Flowchart: Alternate Process".

However, there is no option for it when I go to Tools -> Customize -> Keyboard. Only for basic shapes such as Rectangle :crazy:

Is there a method of adding this, such as through a macro?

Thanks

Re: Shortcut for a specific Shape Type

PostPosted: Tue Feb 10, 2015 7:01 pm
by Yoshi_Ma
I worked it out myself. Add a shortcut to the following Macro:

Code: Select all   Expand viewCollapse view
sub InsertAltProcess
   dim document as object
   dim dispatcher as object

   document   = ThisComponent.CurrentController.Frame
   dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
   
   dispatcher.executeDispatch(document, ".uno:FlowChartShapes.flowchart-alternate-process", "", 0, Array())
end sub