Symbols in word

Hi,

I am generating a document in Word using aspose and C#. I need to populate my document with some symbols but this isn’t working out for me… I actually just want to use the “à” symbol in my generated document.

If my explanation isn’t clear enough, please ask!

Any help would be really appreciated!

Dear Slia,

Thank you for your request.
To insert a symbol to your document programmatically you need know the code of the symbol. To know that you can use MS Word Insert Symbol Dialog box. Please be sure you have the related font. After that just use the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// here I use as example different symbols
builder.Writeln("\u25A0");
builder.Writeln("\u25A1");
builder.Writeln("\u00A9");
doc.Save(MyDir + "out.doc");

Hope this helps. Please ask me in case of any concerns.

Hi DLana,

Thank you for the reply a while back, it worked fine at the moment when I was using the DocumentBuilder. Now that I want to use Mailmerge I am experiencing the same problem as before. My symbols aren’t showing up!

Here is the code I am using, could you please let me know what I am doing wrong.

// populate fields
document.MailMerge.Execute("myField", "\u00A9");

Thanks in advance!

Hi

Thanks for your request. I think in your case you can try using FieldMergingCallback, please see the following link to learn more:

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.

Best regards,