zkh152 / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

mergefields in a Word document that contains a hyperlink are not correctly replaced #205

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Word document that contains a hyperlink and the same merge field 
above and below that hyperlink.
2. Use xdocreport to fill the mergefield with a test string

What is the expected output? What do you see instead?
The merge field should be replaced with the test string.
Instead, only the merge field above the hyperlink is replaced. The merge field 
below the hyperlink remains in the output as a merge field, but with it's field 
code replaced by the test string. Depending on the test string this can also 
result in an invalid Word document.

What version of the product are you using? On what operating system?
1.0.0 on Windows. Tried with a few earlier releases and these contain the bug 
as well.

Please provide any additional information below.

Original issue reported on code.google.com by Henno.Ve...@gmail.com on 10 Dec 2012 at 3:23

GoogleCodeExporter commented 9 years ago
Attached an example that shows the bug.

Original comment by Henno.Ve...@gmail.com on 10 Dec 2012 at 3:26

Attachments:

GoogleCodeExporter commented 9 years ago
I will study your problem as soon as I will have time.

Thank's to attach your docx+java.

Regards Angelo

Original comment by angelo.z...@gmail.com on 10 Dec 2012 at 3:29

GoogleCodeExporter commented 9 years ago
One example where the document gets invalid xml is when you put a \n inside the 
text to replace.

Original comment by Henno.Ve...@gmail.com on 10 Dec 2012 at 3:29

GoogleCodeExporter commented 9 years ago
Tested the attached bug and it works with 1.0.5.

Original comment by angelo.z...@gmail.com on 7 Aug 2014 at 9:15