OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Non programmer new to OOO - how do I create these macros?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
rmbelson
Newbie
Newbie


Joined: 08 Nov 2005
Posts: 1

PostPosted: Tue Nov 08, 2005 8:03 am    Post subject: Non programmer new to OOO - how do I create these macros? Reply with quote

I want to make two macros to use with Writer. I am writing a book, and chapter by chapter I make discard files to keep those things I might want to use somewhere else.

1. I want to open my main document, then open a second document (discard doc), then return to main doc and go to the very end where I last left off writing. (I've been looking for a <go to> command and can't 't find one)

2. I want to take selected text from main doc, cut and paste it to the bottom of discard doc, make sure it is formatted in single line spacing (where main doc is in double space, discard doc is in single) and then return to the place in main doc where I cut the text from.

My discard docs are named by chapter, but the main doc is the entire book, so I will have to know how to change the internal commands to bring up a new chapter discard file once I've moved on to a new chapter..

many thanks

rmb
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Tue Nov 08, 2005 9:45 am    Post subject: Reply with quote

You have to learn on Text cursors :
tutorial StarBasic StarOffice 7.O
http://docs.sun.com/db/doc/817-1826?q=StarOffice
Andrew Pitonyak's free document
http://www.pitonyak.org/AndrewMacro.sxw
All can be found in the link :
http://api.openoffice.org/TipsAndTricks/external.html
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
accabrown
Power User
Power User


Joined: 21 Apr 2004
Posts: 75
Location: England

PostPosted: Tue Nov 08, 2005 9:56 am    Post subject: Reply with quote

These are quite complicated, and you need to decide whether working manually won't save you time in the long run.

writing OOo macros is fun, but it's almost always also a huge waste of time for writers.

If what you want is a record of how you have changed the book, it's probably much simpler to investigate the versioning controls of OOo. Look under file -> versions. I have used this myself when writing books. The only drawback is that versioning information is (I think) lost when you save a document in word format. SO you make a copy, and save that, preerving all your previous stuff in native OOo format.

I don't know whetherit would be possible to work with versions of a document using macros. That way you might be able to prodice a file of all the text you had removed or insterted by automating the "Compare Document" command. But this is just handwaving.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group