I'm using Writer 2.4 .I created a new template named "HelloWorld.ott". When I want to write a new document using that template, I have to click: File/New Document/Templates/HelloWorld Of course this works quite fine. Now you may think I'm lazy but I have to use that template many times a day and it's a repetitive task, so I'm looking for a faster way to do it. I could set it as Default Template but that's not a solution because I also use other two templates very often.
I'm new to OpenOffice and I really want to get rid of the expensive micromonster. Usually, the main cause of desisting is that I know how to do something with Microsoft Office but I don't know how to do the same with OpenOffice. So I have two questions:
1) It would be great if I could have my HelloWorld templatet in the options of New Document. I mean, just click: File/New/HelloWorld (Just under Text Document Ctrl + N) Do you know a simple way to do this?
2) If 1) is not possible, then I tried by recording a Macro. The idea is to press a button and have a New Writer Document created using HelloWorld template. I tried recording the process of clicking File/New Document/Templates/HelloWorld. But when running the macro, it stops just before I selected HelloWorld template. I can't figure out the way to modify the script in order to select HelloWorld template. The script text is as follows:
Code: Select all
sub HelloWorld
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:NewDoc", "", 0, Array())
end sub
Many thanks for your answers. I really appreciate your help!