Copy as Link in a Macro

Matt W. shared this question 3 years ago
Discussion Open

I would like to programmatically add a hyperlink to a topic in one map (Map A) to go a topic in a second map (Map B).

If i were to do this using the UI, I would go to Map B, right click on my topic and choose "Copy as Link". Then I would go to Map A, right click on my target topic and choose "Paste as link". This would give me a clickable link on a topic in Map A, which would open Map B and take me directly to the topic.

Is there a way to do this in a macro using WinWrap Basic and the MindManager object model?

I'm using Mind Manager for Teams so the maps are stored in Sharepoint.

Thanks - Matt

Replies (1)

photo
2

Hello Matt

Yes this is possible.

In MindManager for Windows you can make a hyperlink to a topic in a map using its Guid. The method is:

Topic.Hyperlinks.AddHyperlinkToTopicByGuid(pTopicGuid as String, pAddress as String)

This will add a hyperlink to the topic's hyperlinks collection, pointing at a remote topic identified by pTopicGuid, in the remote map identified by pAddress. The topic Guid can be obtained from the property Topic.Guid.

What I don't know is if or how this will work when translated to the HTML5 viewer used in Teams.

photo
1

Hi Nick - thanks for the answer. I ended up doing something slightly different. I struggled getting what you recommended above to work with my maps being stored in sharepoint. This seemed to cause some problems with the file address/path. Instead I created a macro to open the file using a link to the sharepoint file that I already have stored and then focused on the topic using the GUID.

Your answer was helpful, I just ended up using your info in a slightly different way!

Thanks - Matt

---