Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2022, 01:13 PM
SamHolmes2022 SamHolmes2022 is offline Drop down text with content control Windows 7 64bit Drop down text with content control Office 2021
Novice
Drop down text with content control
 
Join Date: Apr 2022
Posts: 4
SamHolmes2022 is on a distinguished road
Default Drop down text with content control

I'm just trying to get my head around the best way of achieving this if anyone could help?

I basically have a drop down list of selections that when clicked, populate a section of text from another word document that keeps it's style and formatting.



Is that doable? I read somewhere about using VBA to insert the text at bookmarks set up in the page?

Or are there any other ways?

Thanks
Reply With Quote
  #2  
Old 04-12-2022, 04:24 PM
Charles Kenyon Charles Kenyon is offline Drop down text with content control Windows 10 Drop down text with content control Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,455
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

As an alternative method, consider saving your text as building blocks and using a Building Blocks Gallery Content Control. This would not require macros (vba) but would require that the user have access to the template that holds the building blocks.
Reply With Quote
  #3  
Old 04-12-2022, 10:11 PM
SamHolmes2022 SamHolmes2022 is offline Drop down text with content control Windows 7 64bit Drop down text with content control Office 2021
Novice
Drop down text with content control
 
Join Date: Apr 2022
Posts: 4
SamHolmes2022 is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
As an alternative method, consider saving your text as building blocks and using a Building Blocks Gallery Content Control. This would not require macros (vba) but would require that the user have access to the template that holds the building blocks.
I did have a brief look at building blocks. Do you know how I'd set it up to be able to link to the dropdown selections?
Reply With Quote
  #4  
Old 04-13-2022, 01:02 AM
Charles Kenyon Charles Kenyon is offline Drop down text with content control Windows 10 Drop down text with content control Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,455
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

Quote:
Originally Posted by SamHolmes2022 View Post
I did have a brief look at building blocks. Do you know how I'd set it up to be able to link to the dropdown selections?
Take a look at the Building Blocks Gallery Content Control. It is a dropdown of your building blocks.
Reply With Quote
  #5  
Old 04-13-2022, 03:24 AM
SamHolmes2022 SamHolmes2022 is offline Drop down text with content control Windows 7 64bit Drop down text with content control Office 2021
Novice
Drop down text with content control
 
Join Date: Apr 2022
Posts: 4
SamHolmes2022 is on a distinguished road
Default

Thanks, I don't think I explained it very well though. I'd like a dropdown list of headings, that when clicked, populate separate paragraphs of chosen text further on in the word document

I'm just not sure how to link it all together
Reply With Quote
  #6  
Old 04-13-2022, 06:12 AM
Charles Kenyon Charles Kenyon is offline Drop down text with content control Windows 10 Drop down text with content control Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,455
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

Quote:
Originally Posted by SamHolmes2022 View Post
Thanks, I don't think I explained it very well though. I'd like a dropdown list of headings, that when clicked, populate separate paragraphs of chosen text further on in the word document

I'm just not sure how to link it all together
OK
You definitely want something other than the BBG Content Control.
Someone likely will help.


If it were me, I think I would use a UserForm rather than a drop-down in the document.
Create a Simple Userform by Graham Mayor, MVP
Reply With Quote
  #7  
Old 04-13-2022, 06:18 PM
Guessed's Avatar
Guessed Guessed is offline Drop down text with content control Windows 10 Drop down text with content control Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
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 would do this by putting all the content into the one document and bookmarking the sections that need to be 'included' by the user. You then hide all the bookmarked areas. When the user selects a section, you have a macro run that sets that bookmarked range as visible.

We already have code samples on this forum for similar requirements - sometimes these use content controls instead of bookmarks if it is more suitable.

Quote:
I basically have a drop down list of selections that when clicked, populate a section of text from another word document that keeps it's style and formatting.
I'm not sure I understand how you envisage the user will interact with this method. Perhaps a series of Content Control check boxes would be a reasonable interactive method and simplify the coding.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 04-13-2022, 11:47 PM
SamHolmes2022 SamHolmes2022 is offline Drop down text with content control Windows 7 64bit Drop down text with content control Office 2021
Novice
Drop down text with content control
 
Join Date: Apr 2022
Posts: 4
SamHolmes2022 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I would do this by putting all the content into the one document and bookmarking the sections that need to be 'included' by the user. You then hide all the bookmarked areas. When the user selects a section, you have a macro run that sets that bookmarked range as visible.

We already have code samples on this forum for similar requirements - sometimes these use content controls instead of bookmarks if it is more suitable.

I'm not sure I understand how you envisage the user will interact with this method. Perhaps a series of Content Control check boxes would be a reasonable interactive method and simplify the coding.
That would be perfect, I think check boxes would work better aswell as there will be multiple selections, so they could choose say Option A, Option D and Option F. Then sections of text populates for each selection.

I don't suppose you could point me in the right direction of suitable code for that please? It's abit of a minefield trying to find something that will work
Reply With Quote
  #9  
Old 04-14-2022, 10:30 AM
Charles Kenyon Charles Kenyon is offline Drop down text with content control Windows 10 Drop down text with content control Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,455
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

Just a note that even though text is hidden in a Word document, it is still there.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down text with content control Drop Down & Text Content Control forskare Word VBA 3 06-13-2019 08:21 PM
Copy Formatted Text in one Rich Text Content Control to another Rich Text Content Control Haygordon Word 1 04-05-2019 05:43 AM
Drop down text with content control Auto populate text box based on drop-down content control and repeat the process via copy paste helenndp Word VBA 2 09-27-2018 11:04 AM
VBA to provide text string with specific formating based on Drop down list (content control) MP1989 Word VBA 4 07-30-2018 02:40 AM
Drop down text with content control Is there a way to anchor drop-down content control boxes so entering text doesn't change formatting? TzarChasm Word 7 04-14-2016 06:28 PM

Other Forums: Access Forums

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