Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2023, 02:36 AM
gmayor's Avatar
gmayor gmayor is offline Clear all content controls (Text, dropdown) AND change option button values to FALSE in MS Word Form Windows 10 Clear all content controls (Text, dropdown) AND change option button values to FALSE in MS Word Form Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 ofgmayor has much to be proud of
Default

The first option in a dropdown list is normally the placeholder text and if you set the value to "" or vbNullString as in Greg's macro the placeholder text should be displayed. You can however select any item in the list using the following -
Code:
Case Is = wdContentControlDropdownList
        oCC.Type = 1
        oCC.Range.Text = vbNullString
        oCC.Type = wdContentControlDropdownList
         oCC.DropdownListEntries.Item(2).Select
- here the item after the placeholder text.


or even
Code:
Case Is = wdContentControlDropdownList
        oCC.DropdownListEntries.Item(2).Select
Have you considered saving the form as a template from which new documents are created? Then as each new document matches the template there should be no need to clear the form.
__________________
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear all content controls (Text, dropdown) AND change option button values to FALSE in MS Word Form Content Controls - Dependent Dropdown someazguy Word VBA 14 02-05-2023 08:01 PM
Clear all content controls (Text, dropdown) AND change option button values to FALSE in MS Word Form Clear Button For Specific Content Control shaun0406 Word VBA 6 06-14-2021 10:55 AM
Clear all content controls (Text, dropdown) AND change option button values to FALSE in MS Word Form Content Controls - Dependent Dropdown & Text Mightymegs Word VBA 6 05-18-2020 05:34 AM
Clear Values from All Controls on Form ScottyBee Word VBA 2 04-02-2019 09:55 AM
Clear all content controls (Text, dropdown) AND change option button values to FALSE in MS Word Form Add new row to protected form including content controls via Command Button tbrookes Word VBA 5 06-20-2016 02:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:21 AM.


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