Ask Your Question

Enforcing fields to be filled in

asked 2017-08-24 04:48:23 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am creating a template with several text fields. Just to be clear I am not using Base: this are fields in Writer unconnected to any database. I would like to use a macro to validate field contents (and check certain fields have been filled in) before the document is saved or exported. I have already worked out how to connect macros to the right events. But, if my macro returns False, the action (save/e-mail/whatever) still goes ahead. Is there anyway to prevent a Save from a macro event handler?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-08-24 12:23:38 +0200

librebel gravatar image


you could try if returning True works. It would signify that your handler swallows the event instead of propagating it.

edit flag offensive delete link more


this makes no difference

IanHaywood gravatar imageIanHaywood ( 2017-09-12 06:57:29 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-24 04:48:23 +0200

Seen: 38 times

Last updated: Aug 24 '17