How to merge multiple documents into one with Writer

Discuss the word processor

How to merge multiple documents into one with Writer

Postby backwards » Tue Sep 23, 2008 4:50 am

I have a bunch of odt files that I need to merge into 1 document. Is there a way to batch merge multiple documents at once in Writer? There's over 200 total documents so it's not really feasible for me to copy and paste each one individually. I would also like to make sure that the page margins and size are preserved when they're merged. Each individual document is meant to represent a single page so when they're merged each document needs to appear on a new page. Is this possible?
backwards
 
Posts: 7
Joined: Fri Jan 25, 2008 1:05 am

Re: how to merge multiple documents into one with Writer

Postby Villeroy » Tue Sep 23, 2008 3:10 pm

There is a concept of "Master documents" (File>New>Master...) with slave documents linked to it. But that concept is not self-explanatory (I don't get it by try and error): http://documentation.openoffice.org/man ... rGuide.pdf
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17311
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: how to merge multiple documents into one with Writer

Postby acknak » Tue Sep 23, 2008 4:26 pm

I think you're in for a lot of mouse work, unless you prefer to write some kind of macro program.

Actually, it might not be so bad to do it by hand: get a list of all the file names, in order, in a text document. Select the file name and Edit > Cut. Then, Insert > File, paste the file name, OK. Type Ctrl+Enter to start a new page, cut the next file name, insert file... and so on.

You can record the Ctrl+Enter and Edit > Cut as a macro and assign it to a key if you want; you can't record the Insert > File because it will just insert the same file every time.
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17421
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to merge multiple documents into one with Writer

Postby floris v » Tue Sep 23, 2008 7:28 pm

I haven't gone into it, but maybe there's a way to include all files in one folder if you can use an equivalent of findfirst and findnext in a macro. But it's a lot of work to figure that out and doing it manually may take less time.
MS Windows Vista - AOO 4.0.1 - LibreOffice 4.1.0.4.
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
floris v
Moderator
 
Posts: 3029
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: How to merge multiple documents into one with Writer

Postby backwards » Tue Sep 23, 2008 10:16 pm

I found a macro that can be used to combine multiple files but it isn't exactly what I'm looking for. You can download it by visiting the link below and clicking on 'Combine Files'.

http://sourceforge.net/project/showfile ... p_id=87718

The problem with this macro is that it doesn't preserve the page margins and size. I need it to treat each individual file as a separate page in the new document. With this macro you can create a page break after each file but they all appear on the standard 8.5 x 11 page size. There is also a bug in this macro when you use the 'Add a file' option. When you use the 'Add all files in directory' option everything seem to work fine though. Does anyone know of any similar macros to combine files?
backwards
 
Posts: 7
Joined: Fri Jan 25, 2008 1:05 am

Re: How to merge multiple documents into one with Writer

Postby Dave » Wed Sep 24, 2008 12:44 am

I think you can batch convert to PDF? Here's a site that explains somewhat. I have no pressing need, so I didn't read through it. However, if you can do that, there is software to join PDFs, and you might be able to take it from there?

David.
Dave
 
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: How to merge multiple documents into one with Writer

Postby gummiente » Thu Sep 19, 2013 9:42 pm

OOOPY module (http://ooopy.sourceforge.net/) comes along with a script ooo_cat that merges as much odt-documents into a single one.
OOO 3.3 / Ubuntu 10.04
gummiente
 
Posts: 1
Joined: Thu Sep 19, 2013 9:40 pm


Return to Writer

Who is online

Users browsing this forum: skiphos and 26 guests