Free Support Forum -

Bug changing link path in OneNote file


  • Windows 10 x64
  • Visual Studio 2017 (Writing a 32-bit application)
  • Aspose.Note version 18.12, and version 19.9

When changing a link path using:

foreach (var textStyle in richText.Styles.Where(s => s.IsHyperlink))
richText.Text = @"";

The link path is truncated. Some of the characters at the end of the link are not included in the link.

This bug is therefore corrupting links our customer files.

Here is a test file with links.
To reproduce this bug, use the code above to change the links in this sample OneNote file. (21.0 KB)

Could you please share a runnable complete console application which can be used to recreate the scenario here? It will help us to observe the problem and provide assistance accordingly.

[quote=“JohnGrahamLT, post:1, topic:204994”]
foreach (var textStyle in richText.Styles.Where(s => s.IsHyperlink)) { … richText.Text = @“”; }
Here is a Visual Studio 2017 project that demonstrates your bug that creates corrupted links in our customer files: (6.9 MB)

After you run the code, open and examine the links in the OneNote file.

We are working in this issue and need more information. Please send us the images of both the files (original file and the output file created with this code) while opened in OneNote at your end. We want to see the images of links while opened in OneNote. Also share which version of OneNote is used at your end for testing.

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as
NOTENET-2958 – Link paths are truncated while changing the links

We have investigated the issue and made a couple of changes to the your sample. We think it is clear now how you can accomplish this task.
Please, review new sample and let us know your feedback. (3.4 MB)