Hi,
I had a look at the Code Snippets repository for OOBasic to
see how to
merge some documents together:
http://codesnippets.services.openoffice.
org/Writer/Writer.MergeDocs.snip
This code works insofar as the documents it iterates over do
get merged
into one big document (which is just what I want).
The general problem is that in doing the merge, it seems to
cause some
formatting problems.
Here is the situation. I have a lot of .odt documents in a
directory
that were generated under 2.0.2.
1. each document is only different in its interior from the
other
documents. The end of the document, and the beginning of
the document,
are the same for all docs.
2. the start of the document has got a bold-faced, centred
heading.
3. the end of hte document has got a (fixed) date field.
The problem is that when I run the merge macro on these
documents, then:
1. the last line of the text in Doc 1 ends up as the first
line of the
next page.
2. the first line of the next page is left justified, and
not centred.
I tried simply adding a "new paragraph" after
the date field, and this
solves problem 1, but does not solve problem 2.
It seems that my solution to problem 1 is really a hack,
since I feel I
shouldn't have to do this. It seems to me that if I want
a printed
version of the merged doc to look just like my individual
docs (when
individually printed out) then I shouldn't need to use
foreknowledge of
what my docs contain to make it work.
Any ideas on how to preserve the formatting & layout?
Thanks,
Frank
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org |