Free Support Forum - aspose.com

Style of merge-field lost if field name contains a hyphen and field value contains a quote

Hello,

String[] fieldNames = new String[] {"field1", "field2", "to-amount-currency", "to-amount"};
Object[] fieldValues = new Object[] {"EUR", "200'000.00", "EUR", "200'000.00"};
document.getMailMerge().execute(fieldNames, fieldValues);

For field "to-amount" a style is corrupted.

Please note that for Aspose.Words 4 this worked correctly.

Best regards, Evgeniy

Hi

Thank you for reporting this problem to us and for the additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

As a workaround you can try reinsert this field using MS Word.

Best regards,

Hi,

Thank you for considering the issue.

What is the complexity of the problem? Can it be fixed in the nearest release?

Best regards, Evgeniy

Hello

Thanks for your request. At the moment this issue is pending for analysis. The responsible developer will analyze the issue and we will be able to provide you an additional information.

Best regards,

Hello,

Any news here?

Best regards, Evgeniy

Hi Evgeniy,

Thanks for your request. The developers, who are responsible for this issue, will answer you shortly.

Best regards,

Hi Evgeny,


We have analyzed your issue and are working on fixing it. Please expect it fixed in a release of Aspose.Words that is going to be out in the end of July.

Thanks.

Hi Dmitry,

Thank you for the notification. Could you please define a scope of the problem - which cases cause incorrect rendering?

Do you see another workaround than renaming all such fields in documents and Java-code?

Best regards, Evgeniy

Hi Evgeniy,

Thanks for your request. When inserting a text result for a merge field, Aspose.Words uses DocumentBuilder.MoveTo(Field.End). This methods sets font attributes from the reference node (Field.End) and they are used to format the inserted text. This format may be overridden but remains intact if merge format source ends before new result ends. But when MS Word inserts a text in the document, the font attributes are normally duplicated from the previous text. That is the case in this issue: Field.End is formatted differently from the previous runs, it is not bold.

The issue will be resolved before the next hotfix at the end of July.

Best regards,

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


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