We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Change of Hyperlink.Result corrupts link formatting

Hi Aspose team,

I am replacing hyperlink in Word document using simple code like in attached

public void UpdateHyperlink()
{
Aspose.Words.Document doc = new Aspose.Words.Document("input.dotx");
FieldHyperlink hyperlink;

foreach(Field fld in doc.Range.Fields)
{
if (fld.Type.Equals(FieldType.FieldHyperlink))
{
hyperlink = (FieldHyperlink)fld;
hyperlink.Address = NewUrl;
hyperlink.Result = NewName;
}
}
doc.Save("output.dotx");
}

Unfortunately after change is done hyperlink formatting is changed:
- link is not anymore blu
- font size in original file was TimeNewRoman 10 and in changed document is TimeNewRoman12

Please find attached sample project. Just run it and compare input.dotx and output.dotx files.

P.S. Latest version of Aspose components is used.

Thanks for help,
Oliver
In a meantime I tried 16.6, 16.5, 16.2, 16.3 and always the same problem => formatting is gone after changing .Result.

Considering impact that all hyperlink changes in documents are affected would it be possible to give prio to this?

Hi Oliver,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.6.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13960. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,
Hi Awais,

quick check - is realistic that this bug is fixed with next Aspose.Words release?
Problem is that if I failover to Hyperlink class (previous approach) I have issues in identifying all links and that works ok with latest released.

Thanks,
Oliver
Hi Oliver,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. We have asked the ETA of this issue from our product team and will update you as soon as any estimates are available. We apologize for your inconvenience.

Best regards,
Hi again,

would it be possible to get fix for this problem in 16.7.1 version?
Unfortunately this functionality is core of my application and impacts me heavily so your quick help will be extremely appreciated.

Thx,
Oliver

Hi Oliver,


This issue has now been resolved and its fix will be available in next monthly release i.e. Aspose.Words 16.8.0. We will inform you via this thread as soon as next release is published.

Best regards,
Hi Awais,

this is great news, thanks.
If you manage to release 16.7.1 (or similar) with this fix before you officially release 16.8.0 that will be even better ;-).

Btw. what is planned release date for 16.8 considering that you just released 16.7?

Thanks,
Oliver

Hi Oliver,


Thanks for your inquiry. I am afraid, at the moment we don’t have any plans to release interim build such as 16.7.1. However, we will hopefully release 16.8.0 version of Aspose.Words at the start of September 2016.

Best regards,
Hi Awais,

do you have planned date for release of 16.8?

Thanks,
Oliver

Hi Oliver,


I am in coordination with product team to get answer pertaining to your query. Soon you will be updated with the required information.

Best regards,
Hi Awais,

I just tested Aspose.Words 16.8 and problem is not yet fully resolved.

I tried to set new link to www.google.com and formatting was ok (basically link is short) but when I tried to set longer link formatting was not ok.

End result was:

S:\05 Master Forms\47000\47021 (4-14) Stationery Logo Occupational Medicine color.pdf


And, of course, formatting has always to be the same.

Please find attached project and input and output document.


As I already waited long for this fix it will be extremely appreciated if final fix can be provided quickly with 16.8.1 version. Waiting one more month will be really inconvenient.


Thanks in advance,

Oliver

Additional comment - this happens only if hyperlink.Result (TextToDisplay) is long enough to go to the next line.

As long as hyperlink.Result fits to one line formatting is ok.

The issues you have found earlier (filed as WORDSNET-13960) have been fixed in this Aspose.Words for .NET 16.8.0 update and this Aspose.Words for Java 16.8.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
dr_oli:
Hi Awais,

I just tested Aspose.Words 16.8 and problem is not yet fully resolved.

I tried to set new link to www.google.com and formatting was ok (basically link is short) but when I tried to set longer link formatting was not ok.

End result was:

S:\05 Master Forms\47000\47021 (4-14) Stationery Logo Occupational Medicine color.pdf


And, of course, formatting has always to be the same.

Please find attached project and input and output document.


As I already waited long for this fix it will be extremely appreciated if final fix can be provided quickly with 16.8.1 version. Waiting one more month will be really inconvenient.


Thanks in advance,

Oliver


Please follow this thread for further proceedings.

Best regards,

A post was split to a new topic: Hyperlink.Result changes link’s formatting (font size, link color)