Hi
How can I change text in a word document to a hyperlink text using aspose .
Thanks
Hi
How can I change text in a word document to a hyperlink text using aspose .
Thanks
Hi Shinoj,
I dont want to insert new hyper link. What I need is change an existing text from an existing document to hyper link;
For ex I need to change the text for each paragraph to the hyperlink;
foreach (Paragraph paragraph in paragraphs)
{
paragraph.Runs[0]..Text =
//@" HYPERLINK \\l 'toc' ";//" string.Format("HYPERLINK {0}\"{1}\"", ((mIsLocal) ? "\\l " : ""), paragraph.Runs[0].Text);
// paragraph.Runs[0].Text = "" + paragraph.Runs[0].Text + "";
}
Hi,
DocumentBuilder builder = new DocumentBuilder(doc);<o:p></o:p>
Paragraph paragraph = (Paragraph)doc.GetChildNodes(NodeType.Paragraph, true)[0];
string linkText = paragraph.Runs[0].Text;
paragraph.Runs[0].Text = string.Empty;
builder.MoveToParagraph(0, 0);
builder.InsertHyperlink(linkText, "http://www.aspose.com", false);