Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2023, 08:54 AM
Dazz Dazz is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Novice
Multiple Selection List Box in word
 
Join Date: Feb 2023
Posts: 4
Dazz is on a distinguished road
Default Multiple Selection List Box in word


Hello,

I have been looking everywhere with no success. I am trying to create a word doc where you can select multiple items/words using check boxes system, but only list/show the items selected on the word doc after they have been checked. By no means am I a macro expert. Any thoughts or ideas?
Attached Images
File Type: jpg Capture.JPG (67.9 KB, 24 views)
Reply With Quote
  #2  
Old 02-16-2023, 03:52 PM
Guessed's Avatar
Guessed Guessed is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The screen capture you have provided is NOT from Word and there isn't a simple way to do that. To arrive at a similar solution you need to consider 'when' the decision to remove all the non-selected items is supposed to occur because once they aren't there it can be difficult to change your mind or revisit them.

I'm thinking you could have two different ways to address this:
1. Put a series of check box content controls inside a rich text content control and have an on exit macro change visibility as you exit the rich text CC. Include a second macro to show all options as you enter the same CC.
2. Build a vba userform to show all the options and post the result to the document when the user closes the form.

I think you need to post a document which shows the context of what you want so we can see how it might be used.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 02-17-2023, 07:07 AM
Dazz Dazz is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Novice
Multiple Selection List Box in word
 
Join Date: Feb 2023
Posts: 4
Dazz is on a distinguished road
Default

Hello Guessed,

Please see image bellow regarding the look I am trying to achieve.
Attached Images
File Type: jpg Capture.JPG (26.4 KB, 27 views)
Reply With Quote
  #4  
Old 02-19-2023, 08:56 PM
Guessed's Avatar
Guessed Guessed is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Attached is a sample doc with code in the ThisDocument module. This is using Content Controls and macros to produce the list from check boxes.

The code I used is
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
  Dim aCC As ContentControl, aCCnest As ContentControl, sEndorsements As String
  If ContentControl.Tag = "Update" Then
    For Each aCCnest In ActiveDocument.SelectContentControlsByTitle("Endorsements Picker")(1).Range.ContentControls
      If aCCnest.Checked Then sEndorsements = sEndorsements & aCCnest.Title & vbCr
    Next aCCnest
    ActiveDocument.SelectContentControlsByTitle("Endorsements")(1).Range.Text = sEndorsements
  End If
End Sub
Attached Files
File Type: docm Endorsements.docm (35.8 KB, 11 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 08-27-2023, 03:11 PM
Dazz Dazz is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Novice
Multiple Selection List Box in word
 
Join Date: Feb 2023
Posts: 4
Dazz is on a distinguished road
Default Only One Issue

Sorry for the late reply, as life has kept me busy. So the issue that I will have would be that Microsoft sees your code as suspicious and will block it. Is there any way around that so that I don't have to tell everyone using the document to turn of the macro security feature within Microsoft?
Reply With Quote
  #6  
Old 08-27-2023, 04:44 PM
Guessed's Avatar
Guessed Guessed is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I don't think you can do this without macros but it is possible to set templates as 'trusted' documents so macros can run without users needing to click buttons to enable them.

Talk to your IT team and ask them to organise a security certificate so you can sign the macros in the template. They can also then organise the distribution of the template to your users.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 08-27-2023, 06:51 PM
Dazz Dazz is offline Multiple Selection List Box in word Windows 10 Multiple Selection List Box in word Office 2016
Novice
Multiple Selection List Box in word
 
Join Date: Feb 2023
Posts: 4
Dazz is on a distinguished road
Default

Thank you!!! Your help is appreciated.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create multiple selection list box without VBA? kadkam Office 1 03-19-2023 11:03 PM
WORD 365 - unable to create multi selection drop down list with multiple choices cyndor Word 2 01-24-2023 12:04 PM
Having trouble creating a multiple selection drop down list, even after checking other threads sbelinski Word VBA 1 12-14-2020 03:33 PM
Multiple Selection List Box in word Multiple Selection Dropdown list ajanson Word VBA 36 07-15-2019 08:16 PM
Multiple-Selection List in Word 2016 jamboersma Word 1 05-24-2018 06:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:03 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