View Single Post
 
Old 11-20-2018, 09:20 PM
Rafi Rafi is offline Windows 7 64bit Office 2016
Novice
 
Join Date: Nov 2018
Location: Israel
Posts: 14
Rafi is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I've added a macro to the file and included a button on the Quick Access Toolbar to run that macro. The macro is below...
Code:
Sub ClearForm()
  Dim aCC As ContentControl
  For Each aCC In ActiveDocument.ContentControls
    aCC.Range.Select
    If aCC.Type <> wdContentControlDropdownList Then
      aCC.Range.Text = ""
    Else
      aCC.Type = wdContentControlText
      aCC.Range.Text = ""
      aCC.Type = wdContentControlDropdownList
    End If
  Next aCC
End Sub
Hello and thank you very much for the answer.

It works great, but as soon as I've protected the form (The form must be protected), I get a message that there's a problem.

I've attached :
an image of the message and the highlighting of the problematic line (yellow).
the 3 form steps.
the form with the background
Note: The form is printed on a sheet of paper with empty boxes (this is the background you see).
Attached Images
File Type: png VB.png (100.0 KB, 79 views)
Attached Files
File Type: pdf form stages.pdf (227.2 KB, 18 views)
File Type: docx מילוי טפסים_תאי&#.docx (207.0 KB, 17 views)
Reply With Quote