PDA

View Full Version : [SOLVED:] Key press in bookmark



ldoodle
10-20-2017, 02:52 AM
Hey,

Is it possible to detect text change (key press) inside a bookmark and do something?

We use barcodes to automate our OCR scanning - presently someone needs to type in a reference (which is in a bookmark), then manually update a field which uses the bookmarks value as its value. The fields font is set a barcode one.

If I could automatically update that field after every key press that would be cool.

Thanks

macropod
10-20-2017, 04:29 AM
Word has no event you could trap for that. However, if you were to do the input in a content control, you could use a ContentControlOnExit macro to do the updating immediately you exit that content control.

ldoodle
10-23-2017, 02:05 AM
Thanks.

Just tried that and it does seem to work. But if I save it as a dotm template and publish it, when a new document is generated from it, the content control is missing, so it doesn't work.

If I directly edit the dotm, the content control is still there.

?

EDIT: It's because we've defaulted to compatibility mode!