Set Address & Result of Hyperlink Fields in Word DOCX Document & Retain Link's Font Formatting (Size Color) using C++ C# .NET or Java

Is there a work around for this issue?

@support-1,

Starting from the 16.8 version, the latest versions of Aspose.Words now include the fix of WORDSNET-13960. So, please upgrade to the latest version.

In case the problem still remains, then please elaborate your inquiry further by providing complete details of your usecase along with input/output documents and piece of source code. This will help us to understand your scenario, and we will be in a better position to address your concerns accordingly.

Hi @awais.hafeez

Our current license only allows us to use up to v16.6. We wouldn’t be able to upgrade without purchasing a new license. It’s such a minor issue, I was hoping there might be a way to work around this issue with v16.6.

@support-1,

I am afraid, there is no workaround available that you can use with 16.6. Please note that we do not provide support for older released versions of Aspose.Words. We also do not provide any fixes or patches for old versions of Aspose APIs. All fixes and new features are always added into new versions of our APIs. So, the only solution would be to renew your subscription and upgrade to the latest version of Aspose.Words. You can also request a 30-day Temporary License to verify the fix of WORDSNET-13960 on your end. Please refer to How to get a Temporary License?

We’ve noticed this issue doesn’t seem to be consistently replicated. We’re not able to determine what the exact scenario is required to produce the issue and how frequently we’re likely to encounter it. Would you know from the fix that was made, what the exact steps are to reproduce this issue?

@support-1,

I have attached a sample source Word document and Aspose.Words 16.6 and 20.7 generated output DOCX files here for your reference:

C# Code used to generate above 16.6.docx and 20.7.docx files is as follows:

Document doc = new Document(@"E:\Temp\Hyperlink.docx");

foreach (Field fld in doc.Range.Fields)
{
    if (fld.Type.Equals(FieldType.FieldHyperlink))
    {
        FieldHyperlink hyperlink = (FieldHyperlink)fld;
        hyperlink.Address = "https://www.aspose.com/";
        hyperlink.Result = "Aspose";
        break;
    }
}

doc.Save(@"E:\Temp\16.6.docx");

You can observe that Aspose.Words for .NET 20.7 preserves the Font formatting (color etc) while old 16.6 version does not.