I have just started with macros . I regularly use ctrl V to copy formatted text that I have copied onto my clipboard. Unfortunately I cant get it to record in a macro. what am I doing wrong?
1 Like
sub recorded_Paste()
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:Paste", "", 0, Array())
end sub
Limitations of the macro recorder - Recording a Macro
See an example here : Apache OpenOffice Community Forum - [Solved] Recorded macro doesn't perform copy paste steps - (View topic)