Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2015, 11:49 PM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Question Can't reset form fields (Word 2013) and conditional formatting

Hello everyone!



I have a survey and the answers are all in a drop-down form. The survey will be filled out by several respondents and I'd like the options to be reset each time. I've seen the Reset Form Fields eraser icon under Legacy Forms but when I clicked on it, nothing happened.

Also, how do I know if my document is protected or unprotected?

Thank you in advance.

Last edited by Charles Kenyon; 10-15-2015 at 04:30 AM. Reason: changed title to give more info
Reply With Quote
  #2  
Old 10-15-2015, 12:39 AM
gmayor's Avatar
gmayor gmayor is offline Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
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

Save the empty form as a template and create new documents fom it. The new documents will always be cleared of data and there will be no danger of inadvertently saving over wanted data.

The document protection is on the developer tab of the ribbon. You may need to enable the developer tab from the built-in ribbon editor.
__________________
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
  #3  
Old 10-15-2015, 02:06 AM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
Save the empty form as a template and create new documents fom it. The new documents will always be cleared of data and there will be no danger of inadvertently saving over wanted data.

The document protection is on the developer tab of the ribbon. You may need to enable the developer tab from the built-in ribbon editor.
Thank you for your help--it worked! Is there also a way for conditional formatting to work on MS Word? For example the choices on the drop-down list are Unknown, Yes and No. Is there a way to make the selection Red if it's Unknown, Yellow for No and Green for Yes? Or can it only be done on Excel?
Reply With Quote
  #4  
Old 10-15-2015, 02:49 AM
macropod's Avatar
macropod macropod is online now Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

For some conditional formatting code, see: https://www.msofficeforums.com/word-...html#post47254
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 10-15-2015, 02:58 AM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
Save the empty form as a template and create new documents fom it. The new documents will always be cleared of data and there will be no danger of inadvertently saving over wanted data.

The document protection is on the developer tab of the ribbon. You may need to enable the developer tab from the built-in ribbon editor.
Quote:
Originally Posted by macropod View Post
For some conditional formatting code, see: https://www.msofficeforums.com/word-...html#post47254
Thank you! Will this apply to a series of more than 30 drop-down list? The survey has 10 categories with questions varying from 1-5, 1-10, 1-20...etc. The answers in the drop-drown box will also differ and will not stay as Unknown, Yes or No.
Reply With Quote
  #6  
Old 10-15-2015, 03:49 AM
macropod's Avatar
macropod macropod is online now Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

As coded, the macro in the link is for just a single table cell. To work with multiple dropdowns, you could use code like:
Code:
Dim lTbl As Long, lRow As Long, lCol As Long, lClr As Long
Const StrPwd As String = ""
 
Sub ConditionalFormat()
With ActiveDocument
  If .ProtectionType = wdAllowOnlyFormFields Then .Unprotect , StrPwd
  .Tables(lTbl).Cell(lRow, lCol).Range.Shading.BackgroundPatternColor = lClr
  .Protect wdAllowOnlyFormFields, True, NoReset:=True, Password:=StrPwd
End With
End Sub
called by an on-exit macro attached to each formfield coded along the lines of:
Code:
Sub DD1Fmt()
With ActiveDocument.FormFields("Dropdown1")
  lTbl = ActiveDocument.Range(0, .Range.End).Tables.Count
  lRow = .Range.Cells(1).RowIndex
  lCol = .Range.Cells(1).ColumnIndex
  Select Case .Result
    Case "Unknown": lClr = wdColorPink
    Case "Yes": lClr = wdColorLightBlue
    Case "No": lClr = wdColorBrightGreen
    Case Else: lClr = wdColorYellow
  End Select
  Call ConditionalFormat
End With
End Sub
Simply change this latter sub's name and dropdown reference for each calling dropdown.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 10-15-2015, 04:12 AM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Just to verify, I will be pasting both codes right? And this is each time I will be editing a drop-down list? And also for the StrPwd "", am I the one to set that password? If so, where? Sorry I am really confused and thank you so much for all your help and patience.
Reply With Quote
  #8  
Old 10-15-2015, 04:29 AM
Charles Kenyon Charles Kenyon is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You set the password, if you wish one, when you protect the document for forms. You would need to set it in the code before you protect the document.

For more on the developer tab, see Developer Tab.
Reply With Quote
  #9  
Old 10-15-2015, 04:57 AM
macropod's Avatar
macropod macropod is online now Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Quote:
Originally Posted by rogelinepaula View Post
Just to verify, I will be pasting both codes right?
Yes.
Quote:
Originally Posted by rogelinepaula View Post
And this is each time I will be editing a drop-down list?
No. It's only the second sub that would be replicated. You would need to change its name (e.g. from DD1 to DD2) and the name of the Dropdown in references (e.g. from Dropdown1 to Dropdown2).
Quote:
Originally Posted by rogelinepaula View Post
And also for the StrPwd "", am I the one to set that password? If so, where?
Unless you apply forms passwording to the document, you can leave in blank; otherwise, give it the same name as the password you apply in the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 10-15-2015, 03:41 PM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Yes.

No. It's only the second sub that would be replicated. You would need to change its name (e.g. from DD1 to DD2) and the name of the Dropdown in references (e.g. from Dropdown1 to Dropdown2).

Unless you apply forms passwording to the document, you can leave in blank; otherwise, give it the same name as the password you apply in the document.
Thank you--whenever I click on the Drop-down form field from the Legacy, it's not showing the arrow at all that you will click to show the options. Where do I also change the name of the Dropdown in the document or in VBA? I can only see the Bookmark field on the Properties section of the form.

Last edited by rogelinepaula; 10-15-2015 at 06:02 PM. Reason: Confidentiality
Reply With Quote
  #11  
Old 10-15-2015, 04:36 PM
macropod's Avatar
macropod macropod is online now Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Quote:
Originally Posted by rogelinepaula View Post
Thank you--whenever I click on the Drop-down form field from the Legacy, it's not showing the arrow at all that you will click to show the options.
I don't know what arrow you're referring to. Right-clicking then choosing 'Properties', or choosing 'Properties' from the Developer tab will both open up the formfield properties dialogue.
Quote:
Where do I also change the name of the Dropdown in the document or in VBA? I can only see the Bookmark field on the Properties section of the form.
It needs to be the same in both. Word automatically assigns names like Dropdown1, Dropdown2, etc., so you can use those in the VBA.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 10-15-2015, 04:41 PM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
I don't know what arrow you're referring to. Right-clicking then choosing 'Properties', or choosing 'Properties' from the Developer tab will both open up the formfield properties dialogue.

It needs to be the same in both. Word automatically assigns names like Dropdown1, Dropdown2, etc., so you can use those in the VBA.
Yes I right-click on the Legacy Drop-down so that I can add the items/choices. But after setting it all up including the bookmark, I am only seeing the first option I have entered and the rest can't be seen because there is no drop-down arrow.

Last edited by rogelinepaula; 10-15-2015 at 04:41 PM. Reason: Typo
Reply With Quote
  #13  
Old 10-15-2015, 04:45 PM
macropod's Avatar
macropod macropod is online now Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Quote:
Originally Posted by rogelinepaula View Post
But after setting it all up including the bookmark, I am only seeing the first option I have entered and the rest can't be seen because there is no drop-down arrow.
That's because there isn't one. A formfield only ever has the bookmark you (or Word) give it - you can't choose an existing bookmark that's been assigned somewhere else.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #14  
Old 10-15-2015, 05:02 PM
rogelinepaula rogelinepaula is offline Can't reset form fields (Word 2013) and conditional formatting Windows 8 Can't reset form fields (Word 2013) and conditional formatting Office 2013
Novice
Can't reset form fields (Word 2013) and conditional formatting
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
That's because there isn't one. A formfield only ever has the bookmark you (or Word) give it - you can't choose an existing bookmark that's been assigned somewhere else.
But how do I make it as a drop-down list when it won't show the options I'll be providing? This is not the content control I am using but the one from the Legacy Tools.
Reply With Quote
  #15  
Old 10-15-2015, 05:19 PM
macropod's Avatar
macropod macropod is online now Can't reset form fields (Word 2013) and conditional formatting Windows 7 64bit Can't reset form fields (Word 2013) and conditional formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

All you need do is apply the 'filling in forms' editing restrictions. Once you do that the dropdown becomes active.

That said, if your other questions have dropdown content controls, you really should stick to one kind of control - formfields and content controls don't work well together. Unlike formfields, content controls don't require the 'filling in forms' editing restrictions to work. And, since you'll need macros for what you want to do, you could just as well use content controls throughout. In some respects, that would make coding for the conditional formatting simpler, too.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to keep formatted form fields after mail merge or replace text with formatted form fields jer85 Word VBA 2 04-05-2015 10:00 PM
Can't reset form fields (Word 2013) and conditional formatting Reinstalling Office 2013 after factory reset barryd Office 1 05-17-2013 04:24 PM
Form Fields in Word jwm1346 Word 1 04-17-2012 07:02 PM
Can't reset form fields (Word 2013) and conditional formatting Preventing Form Fields to Reset PosseJohn Word VBA 4 07-15-2011 09:44 PM
Form fields in Word messed up mba Word VBA 0 02-07-2010 09:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:58 AM.


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