Ask Your Question

Enforcing fields to be filled in [closed]

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

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 reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-10-13 17:24:46.729111

1 Answer

Sort by » oldest newest most voted

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

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 +0100 )edit

Question Tools

1 follower


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

Seen: 39 times

Last updated: Aug 24 '17