Hi
I’m using Aspose Words 15.9, Visual Studio 2013, and .NET 4.5.
I would like to be able to use formatted text as the display text of a hyperlink inserted into a document using DocumentBuilder.
For example, the code line:
builder.InsertHyperlink(“Text with bold and italic formatting”, “http://www.aspose.com”, false);
Would insert a link into a document with the “Text with bold and italic formatting” in the standard hyperlink style.
But I want to make the words “bold” and “italic” match their formatting. So the link would look more like:
Text with bold and italic formatting
Is there a way I can do this with DocumentBuilder (or without it, whatever works)?
I tried moving to the field.Separator, and then outputting text using the standard DocumentBuilder.Write() method, but that didn’t work:
Field field = builder.InsertHyperlink(string.Empty, url, false);builder.MoveTo(field.Separator);builder.Write(“Link Text”);
Any suggestions?
Thanks
Chris.