TWO THINGS I FORGOT TO DO:
1) post this back to list. Must have pressed wrong button.
2) put the lines between the star-bars in original reply.norseman wrote:
2008/10/1 norseman <[EMAIL PROTECTED]>:Luis Rodrigues wrote:Hi all, I have a 300 page long document that I need to split into multiple documents. Example of text: /fl.1/ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc in felis non tellus ultrices aliquam. Etiam nisl odio, mollis at, consequat id, tempus at, massa. Suspendisse eget ligula. Aliquam vel libero quis lacus mollis vestibulum. Morbi rutrum venenatis purus. Done /fl.2/igula felis, sollicitudin ut, commodo a, elementum ac, ligula. Aenean non erat ac magna varius hendrerit. Quisque et metus sed orci fermentum impe /fl.3/tis purus in magna. Phasellus et lectus sit amet dui commodo placerat. Duis commodo nisi ac sapien. Nunc diam. Integer at ante. Pellentesque Some of the words have footnotes. I need to split the text by the /fl.X/ tags so with the above example I would get 3 writer documents with footnotes. The /fl.X/ tags appear in the middle of the text as on the example and the text all has the same formating. Any suggestion? Any help would be really appreciated. Thanks in advance. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]========================================================The first thing that comes to mind is the simple use of search and replace.find : /fl. replace with: \n\n\n/fl. (where \n implies OS newline) Then cut and paste to new docs. OK - you probably already though of that. Second method:Use the tools/macro/record_macro and do the search/replace above. Then do a search for \n/fl. and mark start of copy, then search for \n\n/fl. and mark end of copy. Then use edit/copy. Then open a new file and name it and useedit/paste and close it. Tag the stop recording and name the macro.You will need to edit the macro. If you use fl_1.doc, fl_2.doc, etc for thenew filenames you can use a loop with a counter for the new file name.fl$sectn".doc" Or OOo equivalent. You could also use the /fl.nn from the top of the new doc as the name. Or have the loop stop and ask you for aname. Lots of ways to do this.If all you have to do is just one source file I would suggest the manual search/replace followed by the find start of copy and just walk your waythrough it. This requires no programming on your part and while it istedious, you will in all likelihood be done sooner than if you attempt theprogramming route.Others may supply actual routines. If so, try them out and choose as youprefer. In the end - achieving the goal is the objective. Steve [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]=================================== Luis Rodrigues wrote: > Could you please explain a bit more how to do the macro. Eg where is > the "mark start of copy"? > How do I search of \n/fl ? use edit->search/replace with regular > expressions? Searching \n\/fl doesn't find anything. > > Regards, > > Luis >
=================================== In OOo swrite: Open one of your problem files. ALT-E F or CTRL-F upper box /fl lower box \n\n\n/fl Bottom left of search/replace box is MORE OPTIONS or some such check regular expressions you want to see a check mark there Right side, upper middle of search/replace box is REPLACE button use it. Results will start /fl.?? three new lines down from it's original position. ******************** Repeat using the REPLACE button until end of file is encountered. Then go to top of document and: ******************** Manually place the cursor on the blank line above the /fl, press left button and hold it down while dragging it to 2nd blank line above next /fl and then CTRL-C (to copy highlighted to copyboard) then, in a second open copy of OOo swriter which is blank or empty of anything, left click in it and do a CTRL-V to paste the highlighted text into it. SAVEAS whatever you want to call it. open a new empty doc in 2nd swriter and proceed to repeat the whole process from "Manually..." at start of this paragraph. Continue until done. Also, spend some time in swriter's HELP section. Read the whole thing so as to become familiar with what is where. Steve [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
