Share via

Fillable Forms with Reset Button

Anonymous
2011-08-16T22:26:16+00:00

I created a protected fillable form in 2007 Word with text and a drop down.  I need to be able to add a reset button to remove the answers and have the worker be able to reuse the form without saving and/or deleting.  Any help?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Jay Freedman 207.7K Reputation points Volunteer Moderator
2011-08-18T14:15:00+00:00

The only way to be able to select the protected parts is to unprotect the form first. This modification of the previous macro will do the whole thing -- unprotect, copy the whole form to the clipboard, and then reprotect while clearing the fields:

Sub ClearForm()

    With ActiveDocument

        If .ProtectionType <> wdNoProtection Then

            .Unprotect

        End If

        .Range.Copy

        .Protect Type:=wdAllowOnlyFormFields, NoReset:=False

    End With

End Sub

After the button is clicked, the user must immediately go to the other program and paste, because the material on the clipboard will be wiped out if they copy anything else first and there won't be any way to recover the information that was in the fields.

Personally, I don't like this because it's too error-prone, but it may work for you. The alternative is to make two macros (with two buttons): One to unprotect and copy, but not clear the fields; and the other just to clear the fields. That way, if the paste fails, the user can come back to the form and copy again, and clear it only when everything is safe.

Was this answer helpful?

0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-08-18T13:33:36+00:00

    I want them to be able to copy and paste the both the form fields and the protected parts.

    Was this answer helpful?

    0 comments No comments
  2. Jay Freedman 207.7K Reputation points Volunteer Moderator
    2011-08-17T23:44:28+00:00

    When you say "copy and paste", do you mean that the user should be able to copy the entire document including both the form fields and the protected parts, or just the field contents?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-08-17T21:06:25+00:00

    Thank you.  I was able to create the macro and add the button.  I want to create the form for people to use over and over so it will be ideal if they could fill in the forms with the necessary information and then copy and paste that information into our system at work.  When they are done with one form I want them to be able to easily clear the form and then begin on the next file.

    The issue I have is that I can't seem to set it up to be able to copy and paste due to the protection on the document.  I need to be able to create this form and send it out to multiple people to be able to use and 'reset' the information without having to open up a new form each time.  Suggestions?

    Was this answer helpful?

    0 comments No comments
  4. Jay Freedman 207.7K Reputation points Volunteer Moderator
    2011-08-17T02:01:25+00:00

    The proper way to do this is to create the form as a template, and let users create new documents from the template. Each new document will start with empty fields.

    If you don't want to do that, you can add the following macro to the document and put a button on the Quick Access Toolbar to run it:

    Sub ClearForm()

        With ActiveDocument

            If .ProtectionType <> wdNoProtection Then

                .Unprotect

            End If

            .Protect Type:=wdAllowOnlyFormFields, NoReset:=False

        End With

    End Sub

    When the macro reprotects the document, the NoReset:=False part will make Word clear the form fields.

    Was this answer helpful?

    0 comments No comments