Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I need record macro help

lo 6.1.2.1 for linux

I press tools --> record macro. Then I right click on a graph, select Export Image as, pick out an name and PNG, then press save. Then I stop the recorder and save the macro. I get something weird.

What am I doing wrong?

Many thanks, -T

sub Main
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 ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:ExportAsGraphic", "", 0, Array())   
end sub