I’m having a report that retrieves data from the database and generate a word document based on a predefined template files.
The issue is the numbers are displayed in English even when the numeral is set to context, and I wanted to be displayed in English when it’s in the English text and in Arabic when it’s in an Arabic text
Notes:
I’m using office word 2007.
To set the numeral:
Click on the office button.
Click on word options.
Select advance from the left pane.
Scroll down to the numeral and set it to context.
Attached is a document that contains a sample created by hand.
Thanks for your request. It is not quite clear for me what you mean. Could you please also attach your sample output document and code, which you use to generate it? I will check the issue and provide you more information.
Attached is a sample report generator run the application 2 times
the first on enter “Loai 123” in the text box and result should be like English_Result.docx in the attachment which is, i dont have any problems so far but on the second enter run of the application enter “لؤي 123” in the text box and the result should be like Arabic_Result.docx in the attachment which is not.
Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue in our defect database. You will be notified once the problem is resolved.
As a temporary workaround of this issue, you can try using the following code:
Document doc = new Document(@"Test001\Arabic_Template.docx");
doc.MailMerge.MergeField += MailMerge_MergeField;
doc.MailMerge.Execute(new string[] { "Text" }, new object[] { "لؤي 123" });
doc.Save(@"Test001\out.doc");