in one of 2011 posts (https://forum.aspose.com/t/76806) I found that you are planning to improve processing of hyperlinks without usage of facade class.
I would say that this is not yet done? Can you please put this on ToDo list as it is weird that in all other components we can access hyperlinks and only in Words additional class is needed.
in one of 2011 posts (https://forum.aspose.com/t/76806) I found that you are planning to improve processing of hyperlinks without usage of facade class.
I would say that this is not yet done? Can you please put this on ToDo list as it is weird that in all other components we can access hyperlinks and only in Words additional class is needed.
Thanks for your inquiry. We have a dedicated FieldHyperlink class now in latest versions of Aspose.Words to deal with Hyperlinks in MS Word documents. Hope, this helps.
Thanks for your inquiry. Please try running the following code:
// Create or load a document
Aspose.Words.Document wordDoc = new Aspose.Words.Document();
// Get first paragraph
Aspose.Words.Paragraph para = wordDoc.FirstSection.Body.FirstParagraph;
para.Runs.Add(new Run(wordDoc, "Some text. "));
// Add the hyperlink field to the paragraph
FieldHyperlink field = (FieldHyperlink)para.AppendField(Aspose.Words.Fields.FieldType.FieldHyperlink, false);
// URL
field.Address = @"""http://www.aspose.com""";
// Text
field.Result = "Go to the Aspose website";
field.Update();
// Set color of the last run
para.Runs[para.Runs.Count - 1].Font.Color = System.Drawing.Color.Blue;
// Save the document
wordDoc.Save(MyDir + @"16.1.0.docx");