#16
|
|||
|
|||
Quote:
When I applied them to more forms, especially with a few boxes, they work perfectly! I'll have to make do with it right now. I need to take the time and try to learn more about the "preparation" of the form for the code , all in order to make intelligent use of the useful codes that you have given me. Thank you very very much for your warm hospitality and helpful explanations. |
#17
|
|||
|
|||
Hi. The code works with text but does not work with check box content control. can we add it in the code please. thank you.
|
#18
|
|||
|
|||
Hi. The code works with text but does not work with check box content control. can we add it in the code please. thank you.
|
#19
|
||||
|
||||
You can choose whether to have the check box unchecked when you run the macro.e.g.
Code:
Sub ClearForm() Dim oCC As ContentControl If ActiveDocument.ProtectionType <> wdNoProtection Then ActiveDocument.Unprotect End If For Each oCC In ActiveDocument.ContentControls On Error Resume Next oCC.Range.Editors.Item(1).Delete On Error GoTo 0 Select Case oCC.Type Case Is = wdContentControlDropdownList oCC.Type = wdContentControlText oCC.Range.Text = "" oCC.Type = wdContentControlDropdownList Case Is = wdContentControlCheckBox oCC.Checked = False Case Else oCC.Range.Text = "" End Select oCC.Range.Editors.Add (wdEditorEveryone) Next oCC ActiveDocument.Protect wdAllowOnlyReading End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#20
|
|||
|
|||
Good afternoon, I am trying to do the same thing as the other guy. I have a word document that I have made into a fillable form. I want to have a reset button that I can click to reset all the fields back to normal. I have tried all the code you have posted in here already and I havent been able to get the document to reset. I was hoping that you would be able to help me.
|
#21
|
||||
|
||||
If you saved the form as Word template before filling it in, there would be no need for any code to reset anything. That's because any document created from the template would automatically open in the original state.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
button "clear format", etc; anchors, functions and properties of OpenType, negative width of symbol? | tvan | Other Software | 1 | 07-18-2018 03:55 PM |
Using outlook form to enforce field to be filled in | megatronixs | Outlook | 1 | 01-21-2015 01:11 PM |
Text form filled shading | Barbara | Word | 2 | 04-25-2013 05:21 AM |
Add a "SAVE" Button to a form template? | Dave L | Word | 9 | 03-21-2012 07:04 PM |
How can create a form in Word 2007 that can be automatically filled? | artistech | Word | 0 | 08-04-2010 01:05 PM |