Ask Your Question

setting event handler in basic (solved) [closed]

asked 2019-10-22 16:02:26 +0100

Pansmanser gravatar image

updated 2019-10-24 11:35:42 +0100

It is a simple matter to associate a macro with an event using the Tools-Customise menu. Is there an equally simple way to do this from basic? The event handler stuff seems very complicated for something which is so simple by manual means. Specifically I want an impress file to do something when the presentation closes (OnViewClosed).

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by erAck
close date 2019-10-26 16:29:19.210313

1 Answer

Sort by » oldest newest most voted

answered 2019-10-22 18:42:30 +0100

Pansmanser gravatar image

I've found the answer to this by modifying pierre-yves' (to whom thanks) code in:

dim Prop(1) as new
Prop(0).name = "EventType" : Prop(0).value = "Script"
Prop(1).name = "Script"
Prop(1).value = " location=document" 
ThisComponent.Events.ReplaceByName("OnViewClosed", Prop())


edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-10-22 16:02:26 +0100

Seen: 124 times

Last updated: Oct 24 '19