We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose version 3.3.0.0 Section Break issue

Hi,

We are having a problem when we generate documents and would like to know if it is a limitation with the version 3.3.0.0 we are using or if there is a work around.

The problem occurs when we use a word 2003 template to merge into; if the template has section breaks in it, the superceeding text in the output file is lost.

If we remove the section break, everything is as normal.

Is this a bug? if we upgrade will this be sorted?

Any help anyone can give us would be most helpful

Thanks in advance.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Could you please attach your document here for testing? I will check the problem on my side and provide you more information.

Best regards,

Hi please find enclosed sample document, with section break

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. But I still cannot reproduce the problem on my side. I tried filling your template with dummy data and everything works correct on my side. I use the latest version of Aspose.Words for Java (4.0.1 BETA).

Could you please simplify your template, provide me simple code example, which will allow me to reproduce the problem and attach your output document?

Best regards,

Hi please find enclosed, my simplified template, along with its ouput. Notice how the information after the section break does not show as it should.

Please also find example code, possibly not the easiest to follow, but should be easy for you to extract info from.

What you have said in your previous reply may indicate that there is a bug in version i am using of Aspose Words, although would like it confirmed by yourselves, that this has been fixed before i upgrade.

Thanks

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I cannot reproduce the problem on my side. Here is a simple code I used for testing:

Document doc = new Document("C:\\Temp\\in.doc");

String[] names = { "REC_Firstname", "REC_Surname", "REC_Fulladdress", "CH_CaseReference", "UD_Firstname", "UD_Lastname" };

Object[] values = { "Alexey", "Noskov", "my address", "test", "UD_Firstname", "UD_Lastname" };

doc.getMailMerge().execute(names, values);

doc.save("C:\\Temp\\out.doc");

I suppose, you copy only the first section of the document into the final document somewhere in your code. That is why the problem occurs. So, please check your code, I think the problem is somewhere on your code.

Best regards.

Hi,

thanks for the reply, yes i have discovered it in our code, it was using sections to split documents and assuming only one section would be used, therefore if a section break was included in the template, the ouptut was cutting the rest out.

Thanks alot for the help and confirmation.