How do I get a radio button or radio group to return its value(s) to a text field using VBA?
I've put together a protected form in Word that, once completed, the user will submit by email. Ideally the email would contain the form pasted into the body of the email rather than as an attachment, but as the form is protected there's no way the user can unprotect the document, "select all", copy and re-protect the document.
So I have provided two options for the user: 1) a Submit button at the end of the form which fires up a blank email with the completed form as an attachment (via the SendMail command). 2) A "copy to clipboard" button which copies the entire Word doc content to the clipboard without the need for the user to unlock and re-lock the document. The user can then manually paste that content into the body of the outgoing email.
This work fine up to a point: when the email is sent to a recipient, controls such as radio buttons and dropdowns won't display for the recipient. All other parts of the form including text fields display as intended.
As a workaround I want to add additional text fields beneath any radio button groups and dropdown lists. I would like these text fields to reflect the selections made using the associated controls. i.e. if the user chooses "No" from a Yes/No radio button group, then the text field beneath that group will populate with the text "No" (because I know that field text will display in the recipient's email even if the actual radio/list control doesn't). The same goes for dropdown lists; whatever the user selects from the list should display in the text field next to the list.
Is there a way/piece of VBA code that will allow a control to "export" its value to a text field?
The two control types I am using are radio buttons groups (Yes/No) and dropdown lists. The rest of the form contains text fields (which work fine).
Thanks.
|