Ask Your Question
0

[basic] How to get name clicked TextFrame? [closed]

asked 2013-07-14 18:44:32 +0200

smentek gravatar image

updated 2014-01-07 00:07:09 +0200

oweng gravatar image

I have two textframes in doc with set macro "hello" on click event. How to recognize which frame has launched a macro? How to get name/ID/'handler' textframe that I clicked?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-11-03 23:09:03.168121

1 Answer

Sort by » oldest newest most voted
0

answered 2013-07-16 08:10:41 +0200

JohnSUN gravatar image

updated 2013-07-16 08:16:21 +0200

May be so?

Sub Hello()
print "You select frame '" + ThisComponent.getCurrentSelection().getName() +"'!"
End Sub

or

Sub Hello1(oEvent)
print "You select frame '" +oEvent+"'!"
End Sub

depending on the type of event being handled

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-07-14 18:44:32 +0200

Seen: 141 times

Last updated: Jul 16 '13