Hi Team,
The issue is appeared in 18.7 version.
Seems that WORDSNET-16965 fix leads to incorrect converting internal links to external.
Please see test.doc and result.docx (just open it) attached:
test.zip (12.3 KB)
result.zip (11.6 KB)
Source code:
var document = new Document(“C:\test.doc”);
document.Save(“C:\result.docx”, SaveFormat.Docx);
I have wrote some workaround, maybe it help you to investigate the issue:
foreach (Aspose.Words.Fields.Field field in document.Range.Fields)
{
if (field.Type == Aspose.Words.Fields.FieldType.FieldHyperlink)
{
Aspose.Words.Fields.FieldHyperlink hyperlink = (Aspose.Words.Fields.FieldHyperlink)field;
if (hyperlink.SubAddress == null && hyperlink.Address.StartsWith("#"))
{
var address = hyperlink.Address.Remove(0,1);
hyperlink.Address = String.Empty;
hyperlink.SubAddress = address;
}
}
}
Thanks.