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.
http://www.aspose.com/Products/Aspose.Words/Api/Aspose.Words.Font.html

Please let me know if you would like to know something else.

Best regards.