ravinkhanted Power User

Joined: 14 Aug 2009 Posts: 52
|
Posted: Wed Dec 23, 2009 11:37 pm Post subject: Macros for opening the existing document |
|
|
I have recorded macro for opening the exisitng file. I tried opening my file at path c:/Untitled 1.ots .
The code generated is
sub openexist
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:Open", "", 0, Array())
end sub
----------------------------
But when i am running the macro, it doesnt open that file. and shows error.
Are there tutorials available for macros learning. what are the pre condition for recording the macros. how to run those macros. What are modification needs to be done once the macro is recorded. |
|