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

Free Support Forum - aspose.com

Hyperlinks have allways a leading # in Word

Hi,

im evaluating Aspose.Words for Java (aspose-words-14.4.1-jdk16.jar) for a migration project. I wanna replace Hyperlinks in documents. I tryed already some of the examples to this topic but i have always the same problem. If i replace or create a hyperlink with aspose, save the document and open it in Word, then the hyperlink target has always the sign # at the beginning. For example i create a new document with this code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertParagraph();
builder.getFont().setStyleIdentifier(StyleIdentifier.HYPERLINK);
builder.insertHyperlink(“Testlink”, “…\data\out.doc”, false);
builder.insertHyperlink(“Testlink2”, “http://www.google.de”, false);
builder.getDocument().updatePageLayout();
builder.getDocument().updateFields();
doc.save(DATA_PATH + “\TestlinkOut.doc”);

After that i open the document in Word and edit the hyperlinks, then the targets are ‘#…\data\out.doc’ and ‘#http://www.google.de’. I dont understand why, can you please help me?

Ciao
Thomas

Hi Thomas,

Thanks for your inquiry.

I
have tested the scenario and have managed to reproduce the same issue
at my side. For the sake of correction, I have logged this problem in
our issue tracking system as WORDSNET-10254. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-10254) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.