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

Free Support Forum - aspose.com

Merge Field- Date Formatting being ignored

If a Merge FIeld has field options of inserting text before or after it will ignore the formatting of the date that needs to be done on the fieldbroken merge.PNG (1.2 KB)

@ITS_Systems

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Aspose. Example.zip (43.2 KB)

there the 3 expected files and i used the default mail mere example that you can download of github

@ITS_Systems

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-19456. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@ITS_Systems

Please note that your expected result is not correct. MS Word and Aspose.Words apply before text (\b) and following text (\f) switches before result formatting. So, the output of the { MERGEFIELD TestDate \b “before " \f " after” @ “MMM. d, yyyy” } field is “Nov. 20, 2019”, not “before Nov. 20, 2019 after”.

The issues you have found earlier (filed as WORDSNET-19456) have been fixed in this Aspose.Words for .NET 19.12 update and this Aspose.Words for Java 19.12 update.