Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
doc.BuiltInDocumentProperties.Title = "This is a cool document created by Aspose.Words";
// Insert hyperlink with empty displayed text
Field hyperlink = builder.InsertHyperlink("", "https://www.aspose.com", false);
// Move document builder inside the hyperlink displayed value (between field separator and field end)
// Put all nodes from the target paragraph into the hyperlink value.
builder.MoveTo(hyperlink.End);
// Insert a field
builder.InsertField("DOCPROPERTY Title");
//doc.UpdateFields();
doc.Save(@"C:\Temp\out.docx");
@jjdoe Yes, you are absolutely right, it is required to set hyperlink style. But I would set hyperlink style before inserting the hyperlink field
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
doc.BuiltInDocumentProperties.Title = "This is a cool document created by Aspose.Words";
// Insert hyperlink with empty displayed text
builder.Font.StyleIdentifier = StyleIdentifier.Hyperlink;
Field hyperlink = builder.InsertHyperlink("", "https://www.aspose.com", false);
// Move document builder inside the hyperlink displayed value (between field separator and field end)
// Put all nodes from the target paragraph into the hyperlink value.
builder.MoveTo(hyperlink.End);
// Insert a field
builder.InsertField("DOCPROPERTY Title");
builder.Font.ClearFormatting();
//doc.UpdateFields();
doc.Save(@"C:\Temp\out.docx");