Merging files into one document

Everything related to our flagship word processor.
Post Reply
morryh
Posts: 4
Joined: 2018-03-27 19:03:24

Merging files into one document

Post by morryh »

I've written a novel, 19 chapters and an Epilogue. Each component is a separate Nisus Pro .rtf file. I now want to put them all into a single .rtf file. How do I go about doing this? Thanks.
AJ Hodges
User avatar
martin
Official Nisus Person
Posts: 5078
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Merging files into one document

Post by martin »

Hello AJ,

We include a macro in Nisus Writer's standard macro set that can help you with this task. Please try using the menu Macro > Document > Join Files and see if it does the trick for you. Let us know if you have any questions or troubles.
morryh
Posts: 4
Joined: 2018-03-27 19:03:24

Re: Merging files into one document

Post by morryh »

The macro worked like the proverbial charm. Many thanks to you people: Thank 1, for writing these macros; Thank 2, for being so prompt with an answer; Thank 3, for selling the world's very best word processor.
User avatar
martin
Official Nisus Person
Posts: 5078
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Merging files into one document

Post by martin »

I'm very happy to hear that the macro worked for you! And thanks for your kind words about Nisus :)

We must give a big thank you to our user Kino for writing this Join Files macro in the first place. He hasn't been active here in a long time, but he was always very gracious in helping everyone out and in writing macros.
madpoli
Posts: 9
Joined: 2020-03-22 15:32:34

Re: Merging files into one document

Post by madpoli »

Hi - I am having the same request, and the Join Files function works. however, it does lose formatting for some documents, not all of them. Any tips?
User avatar
martin
Official Nisus Person
Posts: 5078
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Merging files into one document

Post by martin »

When you say "lose formatting", do you perhaps mean that your document styles are different?

For example, consider that you're merging two files with different "Heading 1" paragraph styles. Perhaps "Heading 1" in one file appears big and bold, but in other file it is small and blue. If you merge such files one of the styles will "win". All headings in the merged file will either be big and bold, or small and blue– you'll never see a mix of both.

This behavior also applies to the "Normal" paragraph style, which is generally used by all regular text in a document. If Normal is not consistently defined across all your files then text using that style will also change its appearance during the merge.

Does that explain what you see? Or is something else going on?
ThosGreen
Posts: 8
Joined: 2021-09-15 03:28:09

Re: Merging files into one document

Post by ThosGreen »

I've hit this one too. After a lot of experimentation, it seems that a file containing a table destroys the formatting of the joined-up document. What happens is this. File A has default formatting, in my case, line spacing 1.1li and space after para set to 10pts; file B, with the same default formatting values, contains a table. Note that there is no conflict between the style sets, because both documents use my default style set. After joining via the macro, the new document has line space 1 li and space-after 0 pts.

It's not a case of one style 'winning', because all the styles are exactly the same in the two documents; and they both use my default set.

But if I then open file B and delete the table, save, and once again join using the macro, there is no problem, the formatting is preserved.

Putting the files together manually works fine, so it's presumably something to do with the macro. Does anyone understand why there should be a problem? and how to fix it?
User avatar
martin
Official Nisus Person
Posts: 5078
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Merging files into one document

Post by martin »

ThosGreen wrote: 2022-05-05 08:12:04 It's not a case of one style 'winning', because all the styles are exactly the same in the two documents; and they both use my default set.

But if I then open file B and delete the table, save, and once again join using the macro, there is no problem, the formatting is preserved.

Putting the files together manually works fine, so it's presumably something to do with the macro. Does anyone understand why there should be a problem? and how to fix it?
This is an interesting and unexpected result. Would you be able to share the documents with me for testing? I can take a look and see what is going on, and hopefully offer some other solution. You can email the files to me at:
Image

If any content in your files is sensitive or private, you can probably trigger the same unwanted behavior after using the redaction macro to scramble the text.
User avatar
martin
Official Nisus Person
Posts: 5078
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Merging files into one document

Post by martin »

Please ignore my request for sample documents. I see your other thread about this issue and I posted a solution there.
Post Reply