![]() |
#1
|
|||
|
|||
![]()
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? |
#2
|
||||
|
||||
![]()
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 |
#3
|
|||
|
|||
![]()
Hello Guessed,
Please see image bellow regarding the look I am trying to achieve. |
#4
|
||||
|
||||
![]()
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
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
![]()
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?
|
#6
|
||||
|
||||
![]()
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 |
#7
|
|||
|
|||
![]()
Thank you!!! Your help is appreciated.
|
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
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 |
![]() |
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 |