Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2015, 10:41 AM
MacroWizard MacroWizard is offline Loop through controls, make certain controls invisible Windows 10 Loop through controls, make certain controls invisible Office 2010 64bit
Novice
Loop through controls, make certain controls invisible
 
Join Date: Nov 2015
Posts: 2
MacroWizard is on a distinguished road
Default Loop through controls, make certain controls invisible

New challenge guys,




I can't seem to make any of my controls invisible programmatically. I am using the following code, which works to identify the controls and successfully loops through the controls; however, I can't seem to find the ".visible" property. Any help?

Code:
Sub ParticipantGuide()
Dim ctl As ContentControl
For Each ctl In ActiveDocument.ContentControls
  If ctl.Type = wdContentControlRichText Then
    If ctl.Tag = "FacilitatorBlock" Then
      ctl.Visible = False
      Else
      ' DO NOTHING
      End If
  End If
Next
End Sub
I may be missing something, overlooking something. Hopefully someone here can help.

Thanks in advance for the creative notions.

p.s. I am not set on using these controls. If I need to change to something else, I can do that. Also, the controls are on the document itself, not on a form.
Reply With Quote
  #2  
Old 11-10-2015, 11:37 AM
MacroWizard MacroWizard is offline Loop through controls, make certain controls invisible Windows 10 Loop through controls, make certain controls invisible Office 2010 64bit
Novice
Loop through controls, make certain controls invisible
 
Join Date: Nov 2015
Posts: 2
MacroWizard is on a distinguished road
Default

Alright so I've made some progress. I can embed the controls within a shape; however, I need the shape to adjust its size as I type. Right now, the richtextbox conforms to the shape. I need the shape to conform to the rest of the document, otherwise users are going to have to resize the shape before they type. That's just annoying.

Why there isn't a .visible property on word developer controls is beyond me.

Any ideas on where to go from here, or suggestions as to what might work?
Reply With Quote
  #3  
Old 11-10-2015, 02:36 PM
gmaxey gmaxey is offline Loop through controls, make certain controls invisible Windows 7 32bit Loop through controls, make certain controls invisible Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

You also run the risk of wasting peoples time which will quickly get you ignored by posting in multiple forums without notification and cross links. See reply at:
http://www.vbaexpress.com/forum/show...eria-invisible
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop and Update Content Controls with value vss712 Word VBA 7 08-27-2015 08:56 PM
VBA for content controls ciresuark Word VBA 1 03-10-2015 03:14 PM
Loop through controls, make certain controls invisible Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM
Loop through controls, make certain controls invisible which controls should i set to make the pasted screen shot fits the boundaries of the Jamal NUMAN Word 2 06-30-2011 05:40 PM
Loop through controls, make certain controls invisible Can't Download Controls BillTheAdmin Project 2 12-05-2005 10:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:20 AM.


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