robbyn OOo Advocate

Joined: 29 Mar 2004 Posts: 308
|
Posted: Sat Mar 06, 2010 3:01 pm Post subject: (ubuntu) Startup macro |
|
|
I am trying to make a macro that runs on startup. Its purpose is to paste the clipboard into a blank text document. What do I need to change?
This is as far as I have got:
I run this from the command line:
oowriter "macro:///Standard.Module1.Paste_on_start"
I get the Basic runtime error. Property or method not found.
This is the line that causes the error message to pop up:
document = ThisComponent.CurrentController.Frame
Quote:
REM ***** BASIC *****
Sub Main
End Sub
sub Paste_on_start
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.DispatchHelpe r")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())
end sub _________________ Robin
When you love a delicate rose remember she has thorns and a root. In time the petals will fall away. |
|