Recorded with Writer the following macro but it is not showing how to specify filename etc.
Would like to have macro code to embed pdfs to slides e.g. the following way:
slide 1 ← 1.pdf
slide 2 ← 2.pdf
…
So that the content is shown in the slide instead of “show as icon” link.
And if possible the macro would be neat to be executable in soffice headless mode from command line.
sub embedpdf2
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:InsertObject", "", 0, Array())
end sub
rgrds Paavo