Free Support Forum - aspose.com

V1.2 Bug - Sections

v1.2 has a bug with regards to sections where after your first merge, all sections in the document are ‘lost’.

Consider the following from the immediate window


?doc.Sections.Count
11

?doc.Sections.Count
0


As you can see - all the sections are lost (i.e. there are no more). Therefore, when I later try to delete a section - I (correctly) get an out of bounds exception.


Luckily I still had v1.1.6 on my machine (as you can no longer download it). I installed that and it works as expected (as follows):

?doc.Sections.Count
11

?doc.Sections.Count
11

This is the behaviour I expected and relied upon.


Cheers,

Jat

Hi Jat,

Thanks for the post.

As a workaround you can delete sections before the mail merge.

I will address this issue promptly.

Thanks Roman,

The workaround requires a fair bit of rewriting of the code - so I think I’ll wait for a fix. Hopefully it’s not too hard.

Jat

Another workaround would have been not to touch Sections object before the mail merge then it should be okay after the mail merge.

But anyway it was fixed in Aspose.Word 1.2.1 available for download now.