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

Free Support Forum - aspose.com

How to write string with underline

Hi,
I want to write string with under line how can i do that.
I am using Aspose.words library and dotnet.
Thanks

Hi
Thanks for your inquiry. You can use the following code.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Font.Underline = Underline.Single;
builder.Write("This is underlined text.");
doc.Save(@"out.doc");

Also see the following link.
https://reference.aspose.com/words/net/aspose.words/font/
Please let me know if you would like to know something else.
Best regards.