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.
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.
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.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.