Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2022, 02:48 AM
wpryan wpryan is offline Conditionally show pages without using VBA Windows 10 Conditionally show pages without using VBA Office 2021
Novice
Conditionally show pages without using VBA
 
Join Date: Oct 2013
Location: Orlando, FL USA
Posts: 26
wpryan is on a distinguished road
Default Conditionally show pages without using VBA


Hi All, I would like to show or hide pages of a document based on selections that are made on the first page (checkboxes). I saw many related threads on the site using VBA, but I'm curious if it can somehow be done without VBA... My company and its clients are hesitant to use any document with Macros due to ransomware, even if it is digitially signed...
Reply With Quote
  #2  
Old 10-18-2022, 03:07 PM
macropod's Avatar
macropod macropod is offline Conditionally show pages without using VBA Windows 10 Conditionally show pages without using VBA Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Not practical without VBA.

In any event, conditional content of that kind should be stored in the document template as Building Blocks (Quick Parts) and, if the macros are also added to the document template, they don't need to be in the document itself and the document can be saved in the macro-free format (i.e. docx).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-18-2022, 07:07 PM
Guessed's Avatar
Guessed Guessed is offline Conditionally show pages without using VBA Windows 10 Conditionally show pages without using VBA Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
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

It is possible to do without VBA but I wouldn't recommend it as it is quite obscure and requires you to update fields .

I've attached a demonstration file that shows how it can be done with a mapped content control and a nested If field which draws its test from the value of the document property the CC maps to. To experiment with this file, change the value of the checkbox and select all then press F9 to update the fields.

The nested field follows the pattern of
{IF {DocProperty x}="true" "Value if true" "Value if false"}
Attached Files
File Type: docx Variable content based on the value of a checkbox.docx (28.3 KB, 2 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditionally show pages without using VBA show or hide layers in all pages ivano Visio 4 12-04-2018 07:10 AM
Show same footnote on multiple pages Cosmo Word 1 01-04-2016 12:07 AM
Header must toggle text & color + show count of conditionally formatted cells below Franktoon Excel 3 02-18-2014 02:10 PM
How To Show Number of Pages in Word 2007 CGM3 Word 2 07-21-2013 08:17 PM
I have a Word 2007 document that only show 13 pages xeonix Word 0 07-06-2009 08:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:28 PM.


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