This is possible with a macro, but not otherwise. The macro below will unprotect the form just long enough to copy the text, and then restore the protection.
- Create the form as a macro-enabled document or template.
- Open the macro editor (Alt+F11).
- Select the name of the form/document in the Project pane. Click Insert > Module.
- Click Tools > References. In the list of available items, locate "Microsoft Forms 2.0 Object Library" and check the box next to it. Click OK.
- Paste in the code from the bottom of this post.
- Change the value of the constant named pwd to the password you use for protecting the form.
- Click Tools > Project Properties, go to the Protection tab of the dialog, check the box to lock the project, and enter a password that will be needed in order to view or edit the macro. That prevents unauthorized people from seeing the form password in
the code.
- Somewhere in the body of the form, insert a field (using Ctrl+F9 to insert the brackets) with the field code {MACROBUTTON CopyForm Click here to copy the form} .
Sub CopyForm()
Dim MyData As DataObject
Const pwd As String = "foo"
On Error GoTo ErrHdl
With ActiveDocument
If .ProtectionType <> wdNoProtection Then
.Unprotect Password:=pwd
End If
Set MyData = New DataObject
MyData.SetText Text:=.Range.Text
MyData.PutInClipboard
.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True, Password:=pwd
End With
Exit Sub
ErrHdl:
If .ProtectionType <> wdNoProtection Then
.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True, Password:=pwd
End If
MsgBox Err.Number & vbCr & Err.Description, , "Error"
End Sub
Sub AutoOpen()
Options.ButtonFieldClicks = 1
End Sub
Sub AutoNew() ' remove this sub if the form is NOT a template
Options.ButtonFieldClicks = 1
End Sub