I'm trying to copy the contents of one Word 2003 form field (NOT a VBA text box) to another on exit of the form field.
I found a wonderful code written by "Fumei" back in June '04 that ALMOST works:
When place this code in a macro and trigger the macro on exit of the form field, I get an error message "User-Defined type not defined" and the macro terminates.
However, if I run the code from the VBA editor the code works fine. (puzzled?)
The form field is set as "regular text" with "fill-in enabled" and "calculate on exit" enabled.
Is there a setting that I am missing? Should I rewrite this with a variable text string?
Any help would be appreciated, thanks.
I found a wonderful code written by "Fumei" back in June '04 that ALMOST works:
Code:
Sub PassToAppraisee2()
ActiveDocument.FormFields("APPRAISEE2").Result = _
ActiveDocument.FormFields("APPRAISEE").Result
End Sub
When place this code in a macro and trigger the macro on exit of the form field, I get an error message "User-Defined type not defined" and the macro terminates.
However, if I run the code from the VBA editor the code works fine. (puzzled?)
The form field is set as "regular text" with "fill-in enabled" and "calculate on exit" enabled.
Is there a setting that I am missing? Should I rewrite this with a variable text string?
Any help would be appreciated, thanks.