Double Quotes in MailMerge field


#1

I'm trying to put text into a mailmerge field with part of the text in double quotes:

e.g. My name is "Fred"

but this appears in the document as My name is

If I try My name is \"Fred\" I get My name is "Fred\"

Any thoughts?


#2

It is strange. I have done the following simple test:

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertField(@"MERGEFIELD ""Name"" ", "┬źName┬╗");

doc.MailMerge.Execute(new string[] {"Name"}, new string[] {@"My name is ""Fred"""});

and it produced correct output My name is "Fred" in the resulting document.

Make sure you are using the latest version of Aspose.Words.

Also, if you are using the latest version please provide additional info sufficient to reproduce the problem.

Best regards,


#3

Further investigation shows that it's not actually Aspose.Words it's Microsoft Word that's complaining - I need to ask Mr. Gates instead.

Thanks for your help.