Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 11-28-2018, 11:31 PM
Rafi Rafi is offline Reset "Button" to clear Word user-filled form, from all filled details. Windows 7 64bit Reset "Button" to clear Word user-filled form, from all filled details. Office 2016
Novice
Reset "Button" to clear Word user-filled form, from all filled details.
 
Join Date: Nov 2018
Location: Israel
Posts: 14
Rafi is on a distinguished road
Default



Quote:
Originally Posted by gmaxey View Post
By adding editors to the content controls (the code I posted does that) and using No Changes, Read Only as the protection method,
The two codes you -gmaxey & Guessed- provided me , are working very effectively!

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.
Reply With Quote
  #17  
Old 10-13-2021, 01:46 AM
arnold_zee32 arnold_zee32 is offline Reset "Button" to clear Word user-filled form, from all filled details. Windows 10 Reset "Button" to clear Word user-filled form, from all filled details. Office 2016
Novice
 
Join Date: Oct 2021
Posts: 2
arnold_zee32 is on a distinguished road
Default

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.
Reply With Quote
  #18  
Old 10-13-2021, 01:48 AM
arnold_zee32 arnold_zee32 is offline Reset "Button" to clear Word user-filled form, from all filled details. Windows 10 Reset "Button" to clear Word user-filled form, from all filled details. Office 2016
Novice
 
Join Date: Oct 2021
Posts: 2
arnold_zee32 is on a distinguished road
Default

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.
Reply With Quote
  #19  
Old 10-13-2021, 02:09 AM
gmayor's Avatar
gmayor gmayor is offline Reset "Button" to clear Word user-filled form, from all filled details. Windows 10 Reset "Button" to clear Word user-filled form, from all filled details. Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #20  
Old 01-20-2023, 11:29 AM
chadhayes chadhayes is offline Reset &quot;Button&quot; to clear Word user-filled form, from all filled details. Windows 11 Reset &quot;Button&quot; to clear Word user-filled form, from all filled details. Office 2021
Novice
 
Join Date: Jan 2023
Posts: 1
chadhayes is on a distinguished road
Default

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.
Attached Files
File Type: docm CLAMPS Note.docm (50.6 KB, 3 views)
Reply With Quote
  #21  
Old 01-20-2023, 02:16 PM
macropod's Avatar
macropod macropod is offline Reset &quot;Button&quot; to clear Word user-filled form, from all filled details. Windows 10 Reset &quot;Button&quot; to clear Word user-filled form, from all filled details. Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

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
Reset &quot;Button&quot; to clear Word user-filled form, from all filled details. 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft