Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-14-2023, 04:32 PM
TheOstrich TheOstrich is offline Hiding rich text content control using checkbox - Removing extra spacing Windows 10 Hiding rich text content control using checkbox - Removing extra spacing Office 2021
Novice
Hiding rich text content control using checkbox - Removing extra spacing
 
Join Date: Nov 2023
Posts: 3
TheOstrich is on a distinguished road
Default Hiding rich text content control using checkbox - Removing extra spacing

Hi all,

I have a check box content control which I'm using to show/hide a rich text content control containing multiple paragraphs of text.

Everything works great, except I have one issue — the rich text content control "container" is still visible, which produces an extra line/paragraph in my document that I do not want.

For example, here is what it looks like:

Image.png

and here is what I want it to look like:

Image2.png

Below is a snippet of the code I'm using to (1) determine the status of the checkbox, and (2) hide the content control.

Code:
isChecked = ActiveDocument.SelectContentControlsByTitle("Checkbox")(1).Checked
ActiveDocument.SelectContentControlsByTitle("Content Control")(1).Range.Font.Hidden = Not isChecked
I've also attached a simplified version of the Word file to illustrate this issue.

Is there any way I can get rid of this extra line? I tried bookmarking the content control and hiding it that way, as well as playing around with the paragraph settings, but no luck. Thank you!
Attached Files
File Type: docm Example CC Issue.docm (69.3 KB, 9 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding rich text content control using checkbox - Removing extra spacing Rich text Content Control Duplicate or Alternative BarnabyS Word 11 10-08-2020 12:06 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
Hiding rich text content control using checkbox - Removing extra spacing Replicate rich text content control value at top of each page gebobs Word 5 05-16-2018 06:00 AM
Hiding rich text content control using checkbox - Removing extra spacing How do you set rich text in a content control Testor Word VBA 4 07-08-2012 07:55 AM
Hiding rich text content control using checkbox - Removing extra spacing Rich Text Content Control - Allow User Formatting keithacochrane Word 1 05-28-2012 05:06 PM

Other Forums: Access Forums

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