Page 1 of 1

Onmouseover: How was it done? How to get the source?

Posted: Mon Sep 03, 2018 7:54 am
by linuxyz
Hi all! ;)

In this old thread (viewtopic.php?uid=49494&f=45&t=47888&start=0), @F3K Total managed to use the "onmouseover" function inside the macro apparently (see the file attached).

I don't see how he did this... :?:

And last question, is it possible to eventually get the source of the hyperlink, as he was asking? (Maybe we can get now that since the thread dates back from 2012)

Thanks a lot for your help! ;)

Re: Onmouseover: How was it done? How to get the source?

Posted: Mon Sep 03, 2018 6:36 pm
by UnklDonald418
I don't see how he did this
Right click on the word hyperlink in the first line.
Select Edit Hyperlink... to open the Hyperlink dialog.
In the Further settings area select the Folder icon to the right of Form: Text to open the Assign macro dialog.

Re: Onmouseover: How was it done? How to get the source?

Posted: Mon Sep 03, 2018 7:19 pm
by linuxyz
Thanks a lot! It's perfect :D
Do you have any idea for the second part of the question (how to get the source)?

Re: Onmouseover: How was it done? How to get the source?

Posted: Mon Sep 03, 2018 11:15 pm
by UnklDonald418
I tried to capture the event with

Code: Select all

Sub MyMacro(oEvent as object)
but a run time exception "wrong number of parameters" is generated, so the event object is not being passed along like usual.
Using the MRI tool I inspected

Code: Select all

ThisComponent.CurrentController.ViewCursor.HyperLinkURL
but it retrieves a Null string and

Code: Select all

ThisComponent.Links.getByName("Bookmarks").getByName("bookmark")
found nothing useful there either.