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

Free Support Forum - aspose.com

Spell checking disabled for mail merge fields

Hi

I am using Aspose.Words .net version.
After executing a mail merge function on a Word document, spell checking is disabled for all the mail merge fields even though the fields have spell checking enabled.
I saw an issue number for the same issue, WORDSNET-13875.
So I wonder when this will be fixed.

Thank you.

@valuepro,

I am afraid, the implementation of WORDSNET-13875 has been postponed till a later date and there is no ETA available at the moment.

Also, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document
  • Aspose.Words 19.5 generated output document showing the undesired behavior
  • Please also create a simplified standalone console application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size.

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.

The test input file is attached.

        Document doc = new Document("test.docx");
        DataSet ds = new DataSet();
        ds.Tables.Add("test");
        ds.Tables["test"].Columns.Add("Title");
        ds.Tables["test"].Columns.Add("Length");
        var dr1 = ds.Tables["test"].Rows.Add();
        dr1["Title"] = "Wrong speling";
        dr1["Length"] = 12;
        doc.MailMerge.ExecuteWithRegions(ds);
        doc.Save(@"output.docx");

test.zip (9.4 KB)

I think this stopped working from version 17.6.
I found version 17.5 works ok.

@valuepro,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-18613. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

You can use the following code as a workaround:

Document doc = new Document("E:\\temp\\test\\test.docx");

DataSet ds = new DataSet();
ds.Tables.Add("test");
ds.Tables["test"].Columns.Add("Title");
ds.Tables["test"].Columns.Add("Length");
var dr1 = ds.Tables["test"].Rows.Add();
dr1["Title"] = "Wrong speling";
dr1["Length"] = 12;
doc.MailMerge.ExecuteWithRegions(ds);

foreach (Run run in doc.GetChildNodes(NodeType.Run, true))
{
    run.Font.NoProofing = false;
}

doc.Save("E:\\Temp\\test\\19.5-NoProofing.docx");

Also, 17.5 and 19.5 both versions cause the same issue on our end.

Thank you for your reply.
The file test.docx I uploaded initially is not a proper file to test this issue, so I updated the file.
When I tested with new file, version 17.5 seemed to work as expected.

@valuepro,

There appears to be no difference between 17.5 and 19.5 generated outputs. Please see 17.5.zip (8.6 KB) i.e. generated by using the following code with Aspose.Words for .NET 17.5:

Document doc = new Document("E:\\temp\\test\\test.docx");
DataSet ds = new DataSet();
ds.Tables.Add("test");
ds.Tables["test"].Columns.Add("Title");
ds.Tables["test"].Columns.Add("Length");
var dr1 = ds.Tables["test"].Rows.Add();
dr1["Title"] = "Wrong speling";
dr1["Length"] = 12;
doc.MailMerge.ExecuteWithRegions(ds);
doc.Save("E:\\Temp\\test\\17.5.docx");

@valuepro,

Regarding WORDSNET-18613, we have completed the work on your issue and concluded to close this issue as ‘Not a Bug’. Please see the following analysis details. This is because Aspose.Words correctly applies noProof attribute for mergefield field result during mailmerge like MS Word does. Here is the MS Word mailmerge output: MS output.zip (9.4 KB).