Macro - Adding a Hyperlink

AW shared this question 2 months ago
Answered

I've created a macro that selects nodes marked with a specific marker, for example, "Priority 2", from a map and copies them to a different file with another map. Unfortunately, I'm struggling with getting these copied nodes to include a hyperlink that would allow me to easily jump back to the original nodes located in the first map.

Could anyone suggest how to do this?

Thanks :)

Replies (3)

photo
2

There are probably several ways to do this. One is to use the method

Topic.CreateHyperlinkToTopicByGuid(guid, address)

where "guid" is the Guid of the target topic, obtained with Topic.Guid, and "address" is the full path to the target document, obtained with Document.FullName. This creates an unnamed link, which you can name by using

Topic.CreateHyperlinkToTopicByGuid(guid, address).Title="displaytext"

where "displaytext" is the hyperlink title that is shown in the map, e.g. the name of the target document, or the text from the target topic.

photo
1

It worked. You're a Genius!
Thanks a ton! :)

photo
1

good to see ppl interested, with LLMs now users are in god mode.

we could do quite a lot of things, and leave the hard things to the real programmers.

Leave a Comment
 
Attach a file