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

Free Support Forum - aspose.com

Is it possible to add hyper link in Textbox (a button function) in words java?

Hi there,

I am wondering if it is possible to a hyper link in Textbox? In fact, we want to add a button in a docx? We use words.java 13.5.0.


Hi Sheng,

Thanks for your inquiry. Sure, you can add a HYPERLINK field inside TextBox Shape by using the following code snippet:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape textBox = new Shape(doc, ShapeType.TEXT_BOX);


textBox.appendChild(new Paragraph(doc));

builder.insertHyperlink(“display text”,http://www.aspose.com/, false);



In fact, we want to add a button in a docx?
Please create your sample Word document using Microsoft Word application and attach it here for our reference. We will provide you code to produce the same document using Aspose.Words.

Best regards,

Thank you so much, Awais!

I want to say: Aspose - excellent product, and excellent support!!

Have a good one!

Hi Sheng,

Thanks for your feedback. In case you have further inquires or need any help, please let us know. We’re always glad to help you.

Best regards,