View Single Post
 
Old 11-14-2012, 06:04 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,384
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Andrew H View Post
I am having all sorts of problems getting a macro to run "on exit" from a drop-down list.

I think there is a fundamental issue that I need some help on. In order for a drop-down list to be "active", the document must be in a protected state. So I ensure my document is in a protected state when the document is provided to a user (who will use the drop-down). Fine.


Now suppose I want the macro to insert text "on exit". Well, presumably I have to unprotect the document to do this.
There's a couple of issues to consider here.

First, you don't necessarily need a macro to conditionally display some text in the document. This could be done via field coding, with the formfield's 'calculate on exit' option checked. See, for example: https://www.msofficeforums.com/word-...html#post38948

Second, if the text is to be put into another formfield, or an unprotected Section of the document, there is no need to unprotect the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote