Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 



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 12:08 PM.


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