MS Word Style Problems when combining multiple documents into one document

We use a software product from a company which has licensed Aspose.Words (amoung other Aspose Modules) to facilitate combining multiple stand alone documents into a single MS Word Document.

As far as I can tell, all interaction between the software and Aspose.Words is handled programatically by the use of .dll application extensions.

We use MS Word to create individual document templates which contain data fields that are pulled from the software's SQL database. These templates are formatted with the use of custom paragraph, table and font styles. We have a list of around 40 unique style elements which are added to the individual templates as they are built.

If we choose a customer, then a single specific template, the data merges and the resulting MS Word document is opened, with the formatting styles all looking as intended.

If we choose a customer, then choose 2 specific templates, again the data merges and the resulting MS Word document is opened, with the formatting styles all looking as intended, HOWEVER if we use the "Style Organizer" each of the style elements shows up twice in the resulting document.

If we choose 3 specific templates, the MS Word document which is produced becomes UNUSASBLE. Font and Paragraph styles are changed (some paragrapf styles end up with huge indent values, huge spacing before or after each paragraph).

So my questions are as follows:

1) Is it likely that my issues are the result of multiple Style Elements with the same name in the rsulting document?

2) Is there any way for me (the end user) to control how Aspose.Words handles the combination of multiple documents that have the same Style Elements?

3) Is there any type of documentation available to me (the end user) which would suggest the "best practise" method for integrating this type of use case? For example, should we limit the addition of needed Style Elements to Global Document Templates?

4) Is there something different the software developer should change in their implementation of Aspose.Words on their end?

Any comments or suggestions would be greatly appreciated!

Thanks,

Brian

Hi Brian,


Thanks for your inquiry.

There are two most authentic ways you can use for merging documents into another Word document e.g:

http://www.aspose.com/docs/display/wordsnet/How+the+AppendDocument+Method+Works
http://www.aspose.com/docs/display/wordsnet/How+to++Insert+a+Document+into+another+Document

Yes, when you use ImportFormatMode.KeepSourceFormatting, styles having the same name are duplicated into the destination document. This is alright when you have a few documents to join. I think, in case the formatting in your documents looks almost identical, you can use ImportFormatMode.UseDestinationStyles instead. There shouldn’t be any problem with formatting when the documents are joined.

Moreover, I am afraid, you can not limit the addition of needed Style Elements to Global Document Templates using current version of Aspose.Words. May be a better approach would be to delete those duplicate/unwanted styles from the Global Document Templates. Unfortunately, the deletion of Styles is also not supported at the moment. Your request has been linked to the appropriate issue (WORDSNET-2304) in our issue tracking system and you will be notified as soon as the Style Deletion feature is supported. Sorry for the inconvenience.

Please let me know if I can be of any further assistance.

Best Regards,

The issues you have found earlier (filed as WORDSNET-2304) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(35)

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan