Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2018, 06:46 AM
lacja lacja is offline Display hidden text based on values in other part of text Windows 7 64bit Display hidden text based on values in other part of text Office 2016
Novice
Display hidden text based on values in other part of text
 
Join Date: Aug 2018
Posts: 3
lacja is on a distinguished road
Default Display hidden text based on values in other part of text

Hi,



we'd like to do something like that in a word document :

"Dear Mrs xyz, referring to article 28.1, 30.3 and 30.4, we will not bla bla bla bla"

And on another page, we'll have all articles (28, 28.1, 29, 30.1, 30.2, 30.3, 30.4, ...) but only show articles that match these from the first page (28.1, 30.3, 30.4)

Is it possible?
Will we need so VBA to accomplish that?
Reply With Quote
  #2  
Old 08-20-2018, 11:09 AM
Charles Kenyon Charles Kenyon is offline Display hidden text based on values in other part of text Windows 10 Display hidden text based on values in other part of text Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 6,521
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

This can be done with Fields or vba. Where possible, I prefer fields because not all Word environments can use macros.

On the first page you would want a bookmarked drop-down content control that has all the options you might use. Then you would want your conditional text to be in IF Fields. This will be complex. I would recommend starting small.

Your IF Fields will need to test for any of the choices that could call for display. Note that IF fields will not update automatically. You might get around this by using Mapped Content Controls. I'm not sure.

You could also use legacy formfields but I recommend avoiding them unless needed.


See my Gender Toolbar Add-In for examples of IF fields.
Reply With Quote
  #3  
Old 08-20-2018, 11:17 AM
Charles Kenyon Charles Kenyon is offline Display hidden text based on values in other part of text Windows 10 Display hidden text based on values in other part of text Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 6,521
Charles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to beholdCharles Kenyon is a splendid one to behold
Default

There are limits to the size of the "TrueText" in an If Field. If you run into those, you could use AutoText and AutoText fields to hold your text.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display multiple values as new values based on selection from template. MvdB Excel 2 09-29-2015 08:51 PM
Display hidden text based on values in other part of text Find text, format part of text in italic d4okeefe Word VBA 17 04-20-2015 12:27 PM
Help: how to replace hidden text with unhidden text when typing over jdcornelius Word 6 03-28-2014 01:19 PM
Display paragraph of text based on value selected in combo WordWaza Word 0 08-09-2013 06:30 AM
Display hidden text based on values in other part of text Hidden style applied over already-hidden text. christie Word 1 08-17-2011 09:10 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 08:27 PM.


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