Free Support Forum - aspose.com

Composite Documents

Hi,

We have been successfully using Aspose.Word for document production for several years. One use case we have is that we produce a 'composite' document so instead of merging each document seperately we keep appending them to the same document - basically the same result you would get if you did a mail merge through Word.

We now have a requirement to produce this composite document and then once it has been reviewed, edited and approved we want to chop it up into separate documents. I see things have moved on considerably in terms of functionality since we first wrote our document production service and so I have some questions:

1) Can Aspose.Word split documents and if so which objects should I be looking at?

2) Can Aspose.Word insert a "document break" marker into the composite so we know where to split the composite?

3) Can you recommend what we should use for the "document break" marker, preferably something that does not appear in word when viewed 'normally' and something that is difficult for someone to inadvertently remove? Word uses a section break but since the template itself could contain a section break this is not suitable.

Thanks in advance,

Phil

You can actually move any node between documents using Document.ImportNode method. This can be used to combine documents as well as to split them. See for example the following article:

http://www.aspose.com/Wiki/default.aspx/Aspose.Words/ExSectionCombineDocuments.html

Any node can be moved that way but in most cases moving sections is the best and the fastest option.

Concerning document break marker, I would suggest using continuous section break repeated twice. It won't affect the document layout and is hardly to be expected in source documents.